Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Commit 41e9223

Browse files
committed
squash line 55-56 into one if statement
1 parent f779651 commit 41e9223

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/checks/canFindDenominatorInNumerator.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ function canFindDenominatorInNumerator(node) {
5151
else {
5252
denominatorArgsLength = 1;
5353
}
54-
// If numerator isn't length 2 or length 1 with a polynomial return false
55-
if (numeratorArgsLength !== 2) {
56-
if (!(numeratorArgsLength === 1) && Node.Type.isConstant(numerator)) {
57-
return false;
58-
}
54+
// If numerator args isn't length 2 or length 1 with a polynomial return false
55+
if (numeratorArgsLength !== 2 &&
56+
(!(numeratorArgsLength === 1 && !Node.Type.isConstant(numerator)))) {
57+
return false;
5958
}
6059
// Function doesn't support denominators with args > 2
6160
// If denominatorArgsLength = 1 the normal functionality already covers it

0 commit comments

Comments
 (0)