X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Frouter.js;h=599cfcb3dce5672dd2fd74207f491bedcfe7bca3;hp=1eb88f913a20f8b6c8a9687e9ba0538fdddd7018;hb=dac395887d96e2d642b209c6db6aaacc3ffacb34;hpb=5fde3a01497262862afc4cb4c9457d4e0ad69a4a diff --git a/client/src/router.js b/client/src/router.js index 1eb88f91..599cfcb3 100644 --- a/client/src/router.js +++ b/client/src/router.js @@ -5,7 +5,7 @@ import Hall from "./views/Hall.vue"; Vue.use(Router); function loadView(view) { - return () => import(/* webpackChunkName: "view-[request]" */ `@/views/${view}.vue`) + return () => import(/* webpackChunkName: "view-[request]" */ `@/views/${view}.vue`) } import { ajax } from "@/utils/ajax"; @@ -46,8 +46,8 @@ const router = new Router({ localStorage["myname"] = res.name; localStorage["myid"] = res.id; } - // TODO: I don't like these 2 lines, "next('/')" should be enough - window.location = "/"; + // TODO: I don't like these 2 lines, "next('/')" should be enough + window.location = "/"; next(); } );