We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d15b778 commit df3562dCopy full SHA for df3562d
packages/menu/src/menu.vue
@@ -271,7 +271,12 @@
271
if (this.router && hasIndex) {
272
this.routeToItem(item, (error) => {
273
this.activeIndex = oldActiveIndex;
274
- if (error) console.error(error);
+ if (error) {
275
+ // vue-router 3.1.0+ push/replace cause NavigationDuplicated error
276
+ // https://github.com/ElemeFE/element/issues/17044
277
+ if (error.name === 'NavigationDuplicated') return
278
+ console.error(error)
279
+ }
280
});
281
}
282
},
0 commit comments