Ensure JSXOpeningElement does not break with single text attr on Babylon (#1229)
This commit is contained in:
1 parent
485028c32f
commit
4dfe92a76b
3 files changed
+4
-3
No files matched your search
+2
-1
@@ -1296,7 +1296,8 @@ function genericPrintNoParens(path, options, print, args) {
|
||||
if (
|
||||
n.attributes.length === 1 &&
|
||||
n.attributes[0].value &&
|
||||
n.attributes[0].value.type === "Literal" &&
|
||||
(n.attributes[0].value.type === "Literal" ||
|
||||
n.attributes[0].value.type === "StringLiteral") &&
|
||||
typeof n.attributes[0].value.value === "string"
|
||||
) {
|
||||
return group(
|
||||
|
||||
@@ -1 +1 @@
|
||||
run_spec(__dirname, null, ["typescript"]);
|
||||
run_spec(__dirname, null, ["babylon", "typescript"]);
|
||||
@@ -1 +1 @@
|
||||
run_spec(__dirname, null, ["typescript"]);
|
||||
run_spec(__dirname, null, ["babylon", "typescript"]);
|
||||
Reference in new issue
Block a user