Skip to content
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 #2724): Fix active links when parent link redirects to child #2772

Merged
merged 5 commits into from
Jul 5, 2019

Conversation

Domino9697
Copy link
Contributor

@Domino9697 Domino9697 commented May 20, 2019

This PR provides a fix to the issue #2724 .

Reproduction link

https://jsfiddle.net/posva/fj7ywzxv/

Whenever a parent node has a redirect option, the router.resolve method will return the redirected route when given the parent location as argument. This creates a problem when comparing a link route with the current route as the link route will be the route of the redirected component and not the route of the parent component...

@posva posva force-pushed the fix-active-parent-redirect-links branch from ada0165 to ac7d83c Compare July 5, 2019 09:18
@posva
Copy link
Member

posva commented Jul 5, 2019

Hey, sorry for the delay and thanks for this! I changed a bit the test and added more. The redirect option should be on a child. it doesn't really make sense to add it alongside a component option since a static redirect route cannot be reached.

Waiting for tests to pass

@posva posva merged commit 64785a9 into vuejs:dev Jul 5, 2019
@vue-bot
Copy link

vue-bot commented Jul 5, 2019

Thanks again! 💚

@Domino9697
Copy link
Contributor Author

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants