Fix sound level retrieval via cookie
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 11 Dec 2018 14:22:59 +0000 (15:22 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 11 Dec 2018 14:22:59 +0000 (15:22 +0100)
public/javascripts/components/game.js

index c949c29..cb4d273 100644 (file)
@@ -20,7 +20,7 @@ Vue.component('my-game', {
                        hints: (getCookie("hints") === "1" ? true : false),
                        color: getCookie("color", "lichess"), //lichess, chesscom or chesstempo
                        // sound level: 0 = no sound, 1 = sound only on newgame, 2 = always
-                       sound: getCookie("sound", "2"),
+                       sound: parseInt(getCookie("sound", "2")),
                };
        },
        render(h) {