* Wrap an arrow function in parentheses if it the test of a conditional expression Fixes #5819 * Use ConditionalExpresion to check if () => {} should be wrapped * Move `t.isTaggedTemplateExpression()` from ArrowFunctionExpression to ConditionalExpresion * [test] `await (() => {})` needs the parentheses * [test] (a ? b : c)`` needs the parentheses
3 lines
55 B
JavaScript
3 lines
55 B
JavaScript
(() => {}) ? a : b;
|
|
a ? () => {} : b;
|
|
a ? b : () => {}; |