esrap 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/handlers.js +3 -1
package/package.json
CHANGED
package/src/handlers.js
CHANGED
|
@@ -616,7 +616,9 @@ const handlers = {
|
|
|
616
616
|
|
|
617
617
|
if (
|
|
618
618
|
node.body.type === 'ObjectExpression' ||
|
|
619
|
-
(node.body.type === 'AssignmentExpression' && node.body.left.type === 'ObjectPattern')
|
|
619
|
+
(node.body.type === 'AssignmentExpression' && node.body.left.type === 'ObjectPattern') ||
|
|
620
|
+
(node.body.type === 'LogicalExpression' && node.body.left.type === 'ObjectExpression') ||
|
|
621
|
+
(node.body.type === 'ConditionalExpression' && node.body.test.type === 'ObjectExpression')
|
|
620
622
|
) {
|
|
621
623
|
state.commands.push('(');
|
|
622
624
|
handle(node.body, state);
|