From ed803c68b2cec14d77d9037786e2c7726f2b5cb7 Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 3 Jul 2017 12:39:08 +0800 Subject: [PATCH] fix next bug --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 8196c341..622efb45 100644 --- a/src/main.js +++ b/src/main.js @@ -53,7 +53,7 @@ router.beforeEach((to, from, next) => { const roles = res.data.role; store.dispatch('GenerateRoutes', { roles }).then(() => { // 生成可访问的路由表 router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表 - next(to); // hack方法 确保addRoutes已完成 + next(Object.assign({}, to)); // hack方法 确保addRoutes已完成 }) }) } else {