Bug fix
authorBenjamin Auder <benjamin.auder@somewhere>
Sun, 16 Feb 2020 00:04:15 +0000 (01:04 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sun, 16 Feb 2020 00:04:15 +0000 (01:04 +0100)
client/src/views/Hall.vue

index ac2bd78..b3f5b69 100644 (file)
@@ -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");