We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8426077 commit 112ec73Copy full SHA for 112ec73
lib/internal/util/comparisons.js
@@ -98,8 +98,11 @@ function isEqualBoxedPrimitive(val1, val2) {
98
return isBigIntObject(val2) &&
99
BigIntPrototype.valueOf(val1) === BigIntPrototype.valueOf(val2);
100
}
101
- return isSymbolObject(val2) &&
102
- SymbolPrototype.valueOf(val1) === SymbolPrototype.valueOf(val2);
+ if (isSymbolObject(val1)) {
+ return isSymbolObject(val2) &&
103
+ SymbolPrototype.valueOf(val1) === SymbolPrototype.valueOf(val2);
104
+ }
105
+ return false;
106
107
108
// Notes: Type tags are historical [[Class]] properties that can be set by
0 commit comments