Skip to content

Commit 7f97bfa

Browse files
committed
Added additional check for right expression type
1 parent 5646f11 commit 7f97bfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

escodegen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@
18531853
leftPrecedence = BinaryPrecedence[expr.left.operator] + 1;
18541854
}
18551855

1856-
if (expr.right.operator === '&&') {
1856+
if (expr.right.type === Syntax.LogicalExpression && expr.right.operator === '&&') {
18571857
rightPrecedence = BinaryPrecedence[expr.right.operator] + 1;
18581858
}
18591859

0 commit comments

Comments
 (0)