X-Git-Url: https://git.auder.net/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fstore.js;h=1cfb7c5a2ba3934efae21113a47c2a98ae49a07a;hb=cd0d7743323309fcfd241ccba959df81a77970c7;hp=3b280d942ce39e82e3306596b87cb492ed83e879;hpb=5f13148449c73de92993b7961c077167563b84e5;p=vchess.git diff --git a/client/src/store.js b/client/src/store.js index 3b280d94..1cfb7c5a 100644 --- a/client/src/store.js +++ b/client/src/store.js @@ -36,8 +36,8 @@ export const store = this.state.user.notify = res.notify; }); } - this.state.conn = new WebSocket( - params.socketUrl + "/?sid=" + mysid + "&page=" + page); + this.state.conn = new WebSocket(params.socketUrl + "/?sid=" + mysid + + "&page=" + encodeURIComponent(page)); // Settings initialized with values from localStorage this.state.settings = { bcolor: localStorage["bcolor"] || "lichess", @@ -49,7 +49,8 @@ export const store = }; this.socketCloseListener = () => { // Next line may fail at first, but should retry and eventually success (TODO?) - this.state.conn = new WebSocket(params.socketUrl + "/?sid=" + mysid); + this.state.conn = new WebSocket(params.socketUrl + "/?sid=" + mysid + + "&page=" + encodeURIComponent(page)); }; this.state.conn.onclose = this.socketCloseListener; const supportedLangs = ["en","es","fr"];