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(errors): NavigationCanceled with async components #3211

Merged
merged 2 commits into from
May 29, 2020
Merged

fix(errors): NavigationCanceled with async components #3211

merged 2 commits into from
May 29, 2020

Conversation

lbwa
Copy link
Contributor

@lbwa lbwa commented May 29, 2020

Canceled behavior should always throw a same canceled error, instead of undefined

Same as these codes:

if (this.pending !== route) {
return abort(createNavigationCancelledError(current, route))
}

Related PR:

Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thank you!
Can you remove the changes in the example folder and add a unit test instead like https://github.com/vuejs/vue-router/pull/3047/files#diff-c044368ddb9969465784dfa4ebfa75cd

@lbwa
Copy link
Contributor Author

lbwa commented May 29, 2020

I will handle it soon

@lbwa
Copy link
Contributor Author

lbwa commented May 29, 2020

@posva I have reverted redundant modifications and added extra unit test for PR

@lbwa lbwa requested a review from posva May 29, 2020 09:44
Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@posva posva changed the title fix(errors): should has a canceled error as well fix(errors): NavigationCanceled with async components May 29, 2020
@posva posva merged commit be39ca3 into vuejs:dev May 29, 2020
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.

2 participants