Skip to content

Commit 1e76b29

Browse files
committed
fixup! error serdes uses Symbol.toStringTag to recreate errors
This is a workaround for errors recreated by error serdes.
1 parent 7fc5aa0 commit 1e76b29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/util/comparisons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ function hasUnequalTag(val1, val2) {
270270
}
271271

272272
function slowHasUnequalTag(val1Tag, val1, val2) {
273-
if (val1[SymbolToStringTag]) {
273+
if (val1[SymbolToStringTag] !== undefined && val2[SymbolToStringTag] !== undefined) {
274274
return val1[SymbolToStringTag] !== val2[SymbolToStringTag];
275275
}
276276
return val1Tag !== ObjectPrototypeToString(val2);

0 commit comments

Comments
 (0)