Emit parens for await (but not yield) of ternary expressions (#5270)

This commit is contained in:
Erik Desjardins
2017-02-06 12:06:48 -05:00
committed by Logan Smyth
parent 8c3392f058
commit e9d7757433
5 changed files with 8 additions and 0 deletions

View File

@@ -197,6 +197,10 @@ export function ConditionalExpression(node: Object, parent: Object): boolean {
return true;
}
if (t.isAwaitExpression(parent)) {
return true;
}
return UnaryLike(node, parent);
}