fix(common): use === operator to match NgSwitch cases#51504
Closed
pkozlowski-opensource wants to merge 1 commit intoangular:mainfrom
Closed
fix(common): use === operator to match NgSwitch cases#51504pkozlowski-opensource wants to merge 1 commit intoangular:mainfrom
pkozlowski-opensource wants to merge 1 commit intoangular:mainfrom
Conversation
a896485 to
1299a2c
Compare
1299a2c to
8323fe0
Compare
8323fe0 to
acd7a93
Compare
JeanMeche
reviewed
Oct 4, 2023
Member
Author
|
Marking as blocked since it will need a G3 patch |
acd7a93 to
af5c15d
Compare
AndrewKushnir
approved these changes
Oct 5, 2023
Contributor
AndrewKushnir
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
38ba5c6 to
fcec4ea
Compare
Member
|
This PR fixes #33873 |
fcec4ea to
1a3b929
Compare
This change adjust the equality comparator used by NgSwitch - now it defaults to === from previously used ==. This change is based on the following reasoning: - align behaviour with the built-in switch block); - improve performance (avoid type coercion); - enable better type-checking. BREAKING CHANGE: the NgSwitch directive now defaults to the === equality operator, migrating from the previously used ==. NgSwitch expressions and / or individual condition values need adjusting to this stricter equality check. The added warning message should help pinpointing NgSwitch usages where adjustements are needed. Fixes angular#33873
Member
Author
|
Adding the "cleanup" label to re-work a G3 patch |
1a3b929 to
da8bd6a
Compare
Member
Author
|
caretaker note: this PR will require CL https://critique.corp.google.com/cl/571889513 |
Contributor
|
This PR was merged into the repository by commit 28a5925. |
|
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. |
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
This change adjust the equality comparator used by NgSwitch - now it defaults to === from previously used ==. This change is based on the following reasoning: - align behaviour with the built-in switch block); - improve performance (avoid type coercion); - enable better type-checking. BREAKING CHANGE: the NgSwitch directive now defaults to the === equality operator, migrating from the previously used ==. NgSwitch expressions and / or individual condition values need adjusting to this stricter equality check. The added warning message should help pinpointing NgSwitch usages where adjustements are needed. Fixes angular#33873 PR Close angular#51504
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exploratory PR to see the impact of modifying the ngSwitch directive from using == in comparisions to using ===.