No rules btn highlight while vname isn't known
authorBenjamin Auder <benjamin.auder@somewhere>
Thu, 30 Apr 2020 23:13:52 +0000 (01:13 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Thu, 30 Apr 2020 23:13:52 +0000 (01:13 +0200)
client/src/components/MoveList.vue

index 96d6704..6385ea0 100644 (file)
@@ -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: {