Pan %!s(int64=8) %!d(string=hai) anos
pai
achega
7efffb9f47
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      src/main.js

+ 2 - 4
src/main.js

@@ -28,11 +28,9 @@ router.beforeEach((to, from, next) => {
           const roles = res.data.role;
           store.dispatch('GenerateRoutes', { roles }).then(() => {
             router.addRoutes(store.getters.addRouters)
-            next(to.path);
+            next(Object.assign({}, to));
           })
-        }).catch(err => {
-          console.log(err);
-        });
+        })
       } else {
         next();
       }