From: Benjamin Auder Date: Sun, 16 Feb 2020 00:04:15 +0000 (+0100) Subject: Bug fix X-Git-Url: https://git.auder.net/doc/html/assets/pieces/app_dev.php/mini-custom.min.css?a=commitdiff_plain;h=566592f84607adf19a812f00c13a75e85d8468e7;p=vchess.git Bug fix --- diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index ac2bd78f..b3f5b690 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -278,6 +278,10 @@ export default { let elt = !!e ? e.target : document.getElementById("btn" + letter.toUpperCase() + type); + // WARNING: this method is called at created in a setTimeout: + // => the page could have changed and element no longer defined. + if (!elt) + return; elt.classList.add("active"); if (!!elt.previousElementSibling) elt.previousElementSibling.classList.remove("active");