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

Stops reporting identical objects as being different #5934

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Nov 3, 2023

What's the problem this PR addresses?

The constraints engine is making a === check, so using the set method with a JS object will never match and will report an error (example here).

How did you fix it?

We now compare stringified values to check sameness. I considered using something like _.equals, but using stringify only returns true when the key are in the same order, which is important for fields like exports.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@arcanis arcanis merged commit 38d2007 into master Nov 3, 2023
@arcanis arcanis deleted the mael/identical-object-values-constraints branch November 3, 2023 16:16
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