Skip to content

Commit

Permalink
Remove hasContent (#1222)
Browse files Browse the repository at this point in the history
A content is a node that isn't an empty statement.
  • Loading branch information
vjeux committed Apr 13, 2017
1 parent 33fdcae commit 27d827a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/printer.js
Expand Up @@ -541,7 +541,7 @@ function genericPrintNoParens(path, options, print, args) {
return printStatementSequence(bodyPath, options, print);
}, "body");

const hasContent = getFirstString(naked);
const hasContent = n.body.find(node => node.type !== "EmptyStatement");
const hasDirectives = n.directives && n.directives.length > 0;

var parent = path.getParentNode();
Expand Down

0 comments on commit 27d827a

Please sign in to comment.