X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=2e011b491d270c0634de20ba2f1198df97700af9;hb=e50a802531b99829c533f22ecd21e359e7e1e049;hp=96d67049b64034178643e035ae0319d552a23158;hpb=57078452549f252460d45e91b84c7eea40dd3e9c;p=vchess.git diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index 96d67049..2e011b49 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -81,7 +81,7 @@ export default { document.getElementById("adjuster") .addEventListener("click", processModalClick); // Take full width on small screens: - let boardSize = parseInt(localStorage.getItem("boardSize")); + let boardSize = parseInt(localStorage.getItem("boardSize"), 10); if (!boardSize) { boardSize = window.innerWidth >= 768 @@ -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: {