Fixing n.comments check in printer (#1239)
This commit is contained in:
1 parent
6a259b60b5
commit
088754fb1e
1 file changed
+1
-1
+1
-1
@@ -1351,7 +1351,7 @@ function genericPrintNoParens(path, options, print, args) {
|
||||
case "JSXText":
|
||||
throw new Error("JSXTest should be handled by JSXElement");
|
||||
case "JSXEmptyExpression":
|
||||
const requiresHardline = n.comments.some(
|
||||
const requiresHardline = n.comments && n.comments.some(
|
||||
comment => comment.type === "Line" || comment.type === "CommentLine"
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user