X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fstore.js;h=705f473c0fec795ca949445e42f540dccb285db5;hp=10ad10e694bffdafd592cb964ae1e56331a4d0ff;hb=f35b9960e1c527fc400ebac85321bd4712459da3;hpb=7ba4a5bc5b64e19a1e7f26aa232d5c50770d07ad 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 =