reported: NavigationDuplicated: Avoided redundant navigation to current location:
Tanks to https://www.programmersought.com/article/82985528840/
Solution:
Write the following code in router.js (due to different configurations, some people may need to write in router/index.js):
import VueRouter from 'vue-router';
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
in index.js in router
Comments
Post a Comment