fix(compiler/codegen): add simple expression node opening bracket for ConditionalExpression (#110)
This commit is contained in:
committed by
Evan You
parent
842f235ede
commit
de9507b6ff
@@ -528,6 +528,7 @@ function genConditionalExpression(
|
||||
const { push, indent, deindent, newline } = context
|
||||
if (test.type === NodeTypes.SIMPLE_EXPRESSION) {
|
||||
const needsParens = !isSimpleIdentifier(test.content)
|
||||
needsParens && push(`(`)
|
||||
genExpression(test, context)
|
||||
needsParens && push(`)`)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user