Fixing n.comments check in printer (#1239)

This commit is contained in:
Axel authored and Christopher Chedeau committed 2017-04-13 18:32:13 -07:00
1 parent 6a259b60b5
commit 088754fb1e
1 file changed
+1 -1
+1 -1
View File
@@ -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"
);