Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8426077

Browse filesBrowse files
ljharbtargos
authored andcommitted
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>
1 parent f9ed5f3 commit 8426077
Copy full SHA for 8426077

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/util/comparisons.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/comparisons.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ function innerDeepEqual(val1, val2, strict, memos) {
221221
if (!areEqualArrayBuffers(val1, val2)) {
222222
return false;
223223
}
224-
} else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {
224+
}
225+
if ((isBoxedPrimitive(val1) || isBoxedPrimitive(val2)) &&
226+
!isEqualBoxedPrimitive(val1, val2)) {
225227
return false;
226228
}
227229
return keyCheck(val1, val2, strict, memos, kNoIterator);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.