Insertafter jsx fix (#8833)

* Add check for JSXElement

* Add test
This commit is contained in:
Kevin Thomas
2018-10-10 21:40:20 +05:30
committed by Suchipi
parent d2c75c2d38
commit 842c164be5
2 changed files with 27 additions and 1 deletions

View File

@@ -107,7 +107,7 @@ export function insertAfter(nodes) {
) {
return parentPath.insertAfter(nodes);
} else if (
this.isNodeType("Expression") ||
(this.isNodeType("Expression") && !this.isJSXElement()) ||
(parentPath.isForStatement() && this.key === "init")
) {
if (this.node) {