[Doc] fix router redirect error

This commit is contained in:
陈嘉涵 2018-02-09 10:41:38 +08:00
parent 267390212b
commit d4e321ed33

View File

@ -28,7 +28,9 @@ router.afterEach(() => {
if (router.currentRoute.name) { if (router.currentRoute.name) {
window.scrollTo(0, 0); window.scrollTo(0, 0);
} }
Vue.nextTick(() => window.syncPath()); if (!router.currentRoute.redirectedFrom) {
Vue.nextTick(() => window.syncPath());
}
}); });
window.vueRouter = router; window.vueRouter = router;