From: Benjamin Auder Date: Thu, 30 Apr 2020 23:13:52 +0000 (+0200) Subject: No rules btn highlight while vname isn't known X-Git-Url: https://git.auder.net/variants/Chakart/pieces/%7B%7B%20path%28%27mixstore_static_home%27%29%20%7D%7D?a=commitdiff_plain;h=77a37196e0b8e21aa9260f8d5c3b73bfb9bea68c;p=vchess.git No rules btn highlight while vname isn't known --- diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index 96d67049..6385ea0d 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -125,7 +125,10 @@ export default { }, btnRulesClass: function() { // "rr" for "rules read" - return { highlightRules: !localStorage.getItem("rr_" + this.vname) }; + return { + highlightRules: + !!this.vname && !localStorage.getItem("rr_" + this.vname) + }; } }, methods: {