-
-
Notifications
You must be signed in to change notification settings - Fork 111
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(common/web): replace invalid StrsItem identity checks with isEqual() #13122
fix(common/web): replace invalid StrsItem identity checks with isEqual() #13122
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
…ocString for a one-character string
In the end, no instances were found where identity was incorrectly used instead of the (new) This PR should still be merged, however, as it cointains some new unit tests. |
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.
I think it's worth doing the review, and the test, as isEqual would actually be the best way to compare.
It's entirely possible that a StrsItem will be used with isEqual in the future.
Changes in this pull request will be available for download in Keyman version 18.0.184-alpha |
In PR #12868 a new
isEqual()
mathod was added toStrsItem
to distinguish identity (===
) and equality (toEqual()
) checks. This was needed to get correct behaviour fromElemElement.isEqual()
andElementString.isEqual()
which both (now) depend onStrsItem.isEqual()
.This PR checks uses of
StrsItem
to identify whereStrsItem.toEqual()
should be used instead of an identity check.Files examined:
Fixes: #12945
@keymanapp-test-bot skip