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 deep-equals for array properties #4672

Merged

Conversation

VictorBaron
Copy link
Contributor

Description
deepEquals was always returning true if any array properties were equals.

Issue
Fixes: (link to issue)

Example
Code example :

const A = {
  array: [1],
  otherProp: true
};
const B = {
  array: [1],
  otherProp: false
};
deepEquals(A, B); // Should return false... but was returning true.

Context
If your change is non-trivial, please include a description of how the new logic works, and why you decided to solve it the way you did. (This is incredibly helpful so that reviewers don't have to guess your intentions based on the code, and without it your pull request will likely not be reviewed as quickly.)

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.)

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2021

🦋 Changeset detected

Latest commit: a46220f

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

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

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

Copy link
Collaborator

@dylans dylans left a comment

Choose a reason for hiding this comment

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

Thanks, I will merge this after we do our next patch release.

@VictorBaron
Copy link
Contributor Author

Cool ! Thanks for the quick review !
Not gonna lie this fixes a bug on my side as well.

@SmilinBrian SmilinBrian mentioned this pull request Nov 20, 2021
5 tasks
@dylans dylans merged commit 2523dc4 into ianstormtaylor:main Nov 22, 2021
z2devil pushed a commit to z2devil/slate that referenced this pull request Dec 6, 2024
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.

2 participants