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(types): Support undefined in NavigationGuardNext #1059

Merged
merged 5 commits into from Aug 3, 2021
Merged

fix(types): Support undefined in NavigationGuardNext #1059

merged 5 commits into from Aug 3, 2021

Conversation

Thomasan1999
Copy link
Contributor

Add support for undefined as the first argument in next function in navigation guards. I've decided to do it through making location argument optional since it seems to me as using undefined is omitting redefining the next route location.

Related to: #1058

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.

Let's add it to the Boolean argument instead as an explicit undefined. Can you also add a test in the dts tests?

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 merged commit 6cce232 into vuejs:master Aug 3, 2021
@posva posva linked an issue Aug 5, 2021 that may be closed by this pull request
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.

next(undefined) in navigation guard throws a TS error
2 participants