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 logic error in isDeepEqual #4674

Closed

Conversation

SmilinBrian
Copy link
Contributor

@SmilinBrian SmilinBrian commented Nov 20, 2021

Description

If an object being tested had an array property that matched, the test was cut short and true returned. If subsequent properties did not match, the result would be wrong.

Example
If a developer used a Mark or something where the value was an array, the isDeepEqual() utility function would incorrectly return true as soon as it found that the array property matched the other object's property.

Checks

  • The new code matches the existing patterns and styles.
  • The tests pass with yarn test.
  • The linter passes with yarn lint. (Fix errors with yarn fix.)
  • The relevant examples still work. (Run examples with yarn start.)
  • You've added a changeset if changing functionality. (Add one with yarn changeset add.)

If an object being tested had an array property that matched, the test was cut short and true returned. If subsequent properties did not match, the result would be wrong.
@changeset-bot
Copy link

changeset-bot bot commented Nov 20, 2021

🦋 Changeset detected

Latest commit: 717f4aa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
slate Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@SmilinBrian
Copy link
Contributor Author

Oh wow, #4672 beat me to it! Well done @VictorBaron !

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.

1 participant