Skip to content

Commit 9691605

Browse files
author
oOBoomberOo
committed
Remove unnecessary null check.
findRootReference() already return non-null reference.
1 parent 97c1efd commit 9691605

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

rules/prefer-t-regex.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ const create = context => {
8181

8282
// Look up references in case it's a variable or RegExp declaration.
8383
const reference = findRootReference(lookup);
84-
85-
if (reference) {
86-
return reference.regex || reference.name === 'RegExp';
87-
}
84+
return reference.regex || reference.name === 'RegExp';
8885
};
8986

9087
const booleanHandler = node => {

0 commit comments

Comments
 (0)