This commit is contained in:
FairyEver
2019-12-14 19:23:40 +08:00
parent ed9878c5f4
commit 0b2d11a61f
8 changed files with 44 additions and 7 deletions

View File

@@ -14,11 +14,11 @@ import routes from './routes'
// fix vue-router NavigationDuplicated
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
return VueRouterPush.call(this, location)
return VueRouterPush.call(this, location).catch(err => err)
}
const VueRouterReplace = VueRouter.prototype.replace
VueRouter.prototype.replace = function replace (location) {
return VueRouterReplace.call(this, location)
return VueRouterReplace.call(this, location).catch(err => err)
}
Vue.use(VueRouter)