Skip to content

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