Fix challenge persistence issue
[vchess.git] / client / src / store.js
index 9d1c6e6..070b22c 100644 (file)
@@ -2,6 +2,7 @@ import { ajax } from "./utils/ajax";
 import { getRandString } from "./utils/alea";
 import params from "./parameters"; //for socket connection
 
+// Global store: see https://medium.com/fullstackio/managing-state-in-vue-js-23a0352b1c87
 export const store =
 {
   state: {
@@ -49,7 +50,7 @@ export const store =
     };
     const socketCloseListener = () => {
       this.state.conn = new WebSocket(params.socketUrl + "/?sid=" + mysid);
-    }
+    };
     this.state.conn.onclose = socketCloseListener;
     const supportedLangs = ["en","es","fr"];
     this.state.lang = localStorage["lang"] ||