Commit df3562d9 authored by iamkun's avatar iamkun Committed by Zhi Cun

Menu: fix router NavigationDuplicated error when using vue-router@^3.1.0 (#17269)

* Menu: fix router NavigationDuplicated error when using vue-router@^3.1.0

* Better fix

* comment

* fix
parent d15b7788
......@@ -271,7 +271,12 @@
if (this.router && hasIndex) {
this.routeToItem(item, (error) => {
this.activeIndex = oldActiveIndex;
if (error) console.error(error);
if (error) {
// vue-router 3.1.0+ push/replace cause NavigationDuplicated error
// https://github.com/ElemeFE/element/issues/17044
if (error.name === 'NavigationDuplicated') return
console.error(error)
}
});
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment