Fix current page in sockets.js
[vchess.git] / client / src / main.js
index 6e22936..9d2e73d 100644 (file)
@@ -22,9 +22,9 @@ new Vue({
         });
       }
     });
-    // TODO: why is this wrong?
+    // TODO: why is this wrong? (Maybe because $route still uninitialized?)
     //store.initialize(this.$route.path);
-    store.initialize(window.location.href.split("#")[1]);
+    store.initialize(window.location.href.split("#")[1].split("?")[0]);
     // NOTE: at this point, variants and tr(anslations) might be uninitialized
   },
 }).$mount("#app");