Skip to content
Permalink
Browse files

util: assert: fix deepEqual comparing fake-boxed to real boxed primitive

PR-URL: #29029
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information...
ljharb authored and targos committed Aug 6, 2019
1 parent f9ed5f3 commit 842607789865ad597b575e6b030dab5b05193662
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/internal/util/comparisons.js
@@ -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);

0 comments on commit 8426077

Please sign in to comment.
You can’t perform that action at this time.