X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fstore.js;h=705f473c0fec795ca949445e42f540dccb285db5;hb=620a88ede2ad25e66d9cbb521388ee53e4a564c0;hp=10ad10e694bffdafd592cb964ae1e56331a4d0ff;hpb=f0c68a04e31bb6a4b2f8b94a532ef3ca2eebbe3e;p=vchess.git diff --git a/client/src/store.js b/client/src/store.js index 10ad10e6..705f473c 100644 --- a/client/src/store.js +++ b/client/src/store.js @@ -76,8 +76,12 @@ export const store = { bcolor: localStorage.getItem("bcolor") || "lichess", sound: getItemDefaultTrue("sound"), hints: getItemDefaultTrue("hints"), - highlight: getItemDefaultTrue("highlight") + highlight: getItemDefaultTrue("highlight"), + randomness: parseInt(localStorage.getItem("randomness")) }; + if (isNaN(this.state.settings.randomness)) + // Default: random asymmetric + this.state.settings.randomness = 2; const supportedLangs = ["en", "es", "fr"]; const navLanguage = navigator.language.substr(0,2); this.state.lang =