-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the error caused by the same path and alias of RouteConfig #2462
Conversation
src/create-route-map.js
Outdated
if (!pathMap[record.path]) { | ||
pathList.push(record.path) | ||
pathMap[record.path] = record | ||
} | ||
|
||
if (route.alias !== undefined) { | ||
if (route.alias === path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warn should only appear on dev mode. Also could you add a test for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I have already added
Hey, I added a check for arrays too and directly merged to |
No description provided.