No rules btn highlight while vname isn't known
[vchess.git] / 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: {