Skip to content

Commit 15a4b71

Browse files
committed
optimised the conditional block
1 parent 7e5811b commit 15a4b71

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/helpers/dependentQuestionsHelper.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,7 @@ const precedence = {
8080
function hasPrecedence(currentOp, opStackTop) {
8181
if (opStackTop === '(' || opStackTop === ')')
8282
return false
83-
if (precedence[opStackTop] >= precedence[currentOp])
84-
return true
85-
else
86-
return false
83+
return precedence[opStackTop] >= precedence[currentOp]
8784
}
8885
/**
8986
* A utility method to apply an operation 'op' on operands

0 commit comments

Comments
 (0)