-
Notifications
You must be signed in to change notification settings - Fork 636
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(assert): handle __proto__
correctly in assertObjectMatch
#6342
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6342 +/- ##
==========================================
- Coverage 96.43% 96.40% -0.03%
==========================================
Files 547 549 +2
Lines 41812 41851 +39
Branches 6347 6348 +1
==========================================
+ Hits 40322 40348 +26
- Misses 1449 1463 +14
+ Partials 41 40 -1 ☔ View full report in Codecov by Sentry. |
const memo = seen.get(a); | ||
if (memo && (memo === b)) return a; |
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.
Is this change necessary? What happens if memo is the value false
?
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.
Just performance thing. If you read the context of the changed lines, you'll realize that will never happen.
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.
See these types: cfbff35
If you say this change should be done in another PR, I understand it and revert this part, but I'd say such a trivial and small change can be okay to come along with...
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.
LGTM. Thanks!
Fixes #6341.