Merge pull request #3147 from babel/seq-throw

Don't print on throw statements with sequence exprs
This commit is contained in:
Amjad Masad
2015-12-07 14:01:38 -05:00

View File

@@ -124,6 +124,10 @@ export function SequenceExpression(node: Object, parent: Object): boolean {
return false;
}
if (t.isThrowStatement(parent)) {
return false;
}
// Otherwise err on the side of overparenthesization, adding
// explicit exceptions above if this proves overzealous.
return true;