Skip to content

Commit

Permalink
Fixing n.comments check in printer (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
axelg12 authored and vjeux committed Apr 14, 2017
1 parent 6a259b6 commit 088754f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/printer.js
Expand Up @@ -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"
);

Expand Down

0 comments on commit 088754f

Please sign in to comment.