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 Repeat(<value>).equals(undefined) incorrectly returning true #1994

Merged
merged 2 commits into from May 10, 2024

Conversation

butchler
Copy link
Contributor

It seems like there was a mistake in this old commit, when deepEqual was switched from an inherited method to a helper function: 79e903b#diff-3ef08c64dab5fc92ebb8aecee330d5e7ae6cc8651f95aab2968b392c228dc606R103

Note that this only happens when calling the .equals method directly. Immutable.is(Immutable.Repeat(<value>), undefined) properly returns false, so this is a very minor issue that's unlikely to happen in practice. I only noticed this because I was looking at the immutable-js source code.

Copy link
Member

@jdeniau jdeniau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!
Thanks for this fix.

Would you mind adding a test that did previously failed and now works?

Thanks

@butchler
Copy link
Contributor Author

Would you mind adding a test that did previously failed and now works?

I pushed a commit that adds a test just now.

@jdeniau jdeniau merged commit be3cb9a into immutable-js:main May 10, 2024
5 checks passed
@jdeniau
Copy link
Member

jdeniau commented May 10, 2024

Thanks, I did merge but I'm not at home actually. I will push a fix probably next week and on the 5.x branch

@butchler butchler deleted the fix-repeat-equals branch May 10, 2024 10:17
@jdeniau
Copy link
Member

jdeniau commented May 13, 2024

This has been released in v4.3.6

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.

None yet

2 participants