Fix parentheses on replaceWithMultiple for JSX (#10598)
* Closes #9851 Fix parentheses on replaceWithMultiple for JSX * Rename test * Use generate(ast) directly
This commit is contained in:
committed by
Nicolò Ribaudo
parent
70c0ed512a
commit
2b082601a7
@@ -115,7 +115,9 @@ export function insertAfter(nodes) {
|
||||
}),
|
||||
);
|
||||
} else if (
|
||||
(this.isNodeType("Expression") && !this.isJSXElement()) ||
|
||||
(this.isNodeType("Expression") &&
|
||||
!this.isJSXElement() &&
|
||||
!parentPath.isJSXElement()) ||
|
||||
(parentPath.isForStatement() && this.key === "init")
|
||||
) {
|
||||
if (this.node) {
|
||||
|
||||
Reference in New Issue
Block a user