Skip to content

Commit c966391

Browse files
committed
Simplify RegExp if statement
1 parent b85ee43 commit c966391

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/util/comparisons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function innerDeepEqual(val1, val2, strict, memos) {
194194
return false;
195195
}
196196
} else if (isRegExp(val1)) {
197-
if (!(isRegExp(val2) && areSimilarRegExps(val1, val2))) {
197+
if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {
198198
return false;
199199
}
200200
} else if (isNativeError(val1) || val1 instanceof Error) {

0 commit comments

Comments
 (0)