Pan 7 anos atrás
pai
commit
6a7124bf9c
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/main.js

+ 2 - 2
src/main.js

@@ -27,8 +27,8 @@ router.beforeEach((to, from, next) => {
         store.dispatch('GetInfo').then(res => {
           const roles = res.data.role;
           store.dispatch('GenerateRoutes', { roles }).then(() => {
-            router.addRoutes(store.getters.addRouters)
-            next(Object.assign({}, to));
+            router.addRoutes(store.getters.addRouters);
+            next({ ...to });
           })
         })
       } else {