From 5db05aea5cc957896d30d9644f3e2f1326290139 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 25 Mar 2018 13:57:52 +0200 Subject: [PATCH] [main] fix 'to' instead of 'history.current' route name --- webpack/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack/main.js b/webpack/main.js index fb0a6f0..72c671a 100644 --- a/webpack/main.js +++ b/webpack/main.js @@ -17,7 +17,7 @@ gs.get.router.beforeEach((to, from, next) => { // {2} Get appropriate page location // let auth_folder = (gs.get.auth) ? 'auth' : 'noauth'; - let page_file = gs.get.router.history.current.name || gs.get.routes[auth_folder][0].name; + let page_file = to.name || gs.get.routes[auth_folder][0].name; // {3} Load page script // require(`./page/${auth_folder}/${page_file}.js`);