[main] fix 'to' instead of 'history.current' route name

This commit is contained in:
xdrm-brackets 2018-03-25 13:57:52 +02:00
parent c5e6b49fa6
commit 5db05aea5c
1 changed files with 1 additions and 1 deletions

View File

@ -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`);