Skip to content

Commit

Permalink
util: assert: fix deepEqual comparing fake-boxed to real boxed primitive
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 6, 2019
1 parent 7759ff9 commit 9f53778
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/util/comparisons.js
Expand Up @@ -221,7 +221,9 @@ function innerDeepEqual(val1, val2, strict, memos) {
if (!areEqualArrayBuffers(val1, val2)) {
return false;
}
} else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {
}
if ((isBoxedPrimitive(val1) || isBoxedPrimitive(val2)) &&
!isEqualBoxedPrimitive(val1, val2)) {
return false;
}
return keyCheck(val1, val2, strict, memos, kNoIterator);
Expand Down

0 comments on commit 9f53778

Please sign in to comment.