Skip to content

Commit 9d1d9bc

Browse files
authored
fix(breadcrumb): navigationDuplicated error (#70)
1 parent 765c94b commit 9d1d9bc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main.jsx

+10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ Vue.component('t-page-header');
2020

2121
Vue.prototype.$request = axiosInstance;
2222

23+
const originPush = VueRouter.prototype.push;
24+
VueRouter.prototype.push = function push(location) {
25+
return originPush.call(this, location).catch((err) => err);
26+
};
27+
28+
const originReplace = VueRouter.prototype.replace;
29+
VueRouter.prototype.replace = function replace(location) {
30+
return originReplace.call(this, location).catch((err) => err);
31+
};
32+
2333
Vue.config.productionTip = false;
2434
sync(store, router);
2535
new Vue({

0 commit comments

Comments
 (0)