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(router): Correct type of nextState parameter in canDeactivate #48038
Conversation
7de8439
to
92f7799
Compare
I would consider this a I'm not sure if we need to consider this a breaking change, but I would expect that we do. I would bet there are tests for guards which manually pass in mocks for the parameter values that would break due to this change. |
92f7799
to
b9706c5
Compare
@atscott About the breaking changes, this PR breaks the internal tests, so yeah it's breaking something. |
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.
@JeanMeche thanks for the PR, I've left a couple minor comments. It'd be great to remove any unrelated changes (removals of new lines, adding semicolons, etc) from this PR, so that it only contains the changes that are needed. You can create a followup PR if there are some formatting changes that you'd like to propose. Thank you.
394dfaf
to
2b369d9
Compare
@AndrewKushnir done ✅ |
It looks like I was wrong about it being a breaking change. We can do this and implementors can still have |
Correct type of nextState parameter in canDeactivate guard to indicate it's never undefined Fixes angular#47153
2b369d9
to
f8bb90a
Compare
@atscott I push the changes for |
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.
reviewed-for: public-api
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.
Reviewed-for: public-api
This PR was merged into the repository by commit b51929a. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…gular#48038) Correct type of nextState parameter in canDeactivate guard to indicate it's never undefined Fixes angular#47153 PR Close angular#48038
Correct type of nextState parameter in canDeactivate guard to indicate it's never undefined
PR Type
What kind of change does this PR introduce?
What is the current behavior?
on
canDeactivate()
,nextState
is always provided, there was no need to make it an optional parameter.Issue Number: #47153
Does this PR introduce a breaking change?