simplify VariableDeclaration ForStatement check

This commit is contained in:
Sebastian McKenzie
2014-11-04 12:47:56 +11:00
parent 43ee3b77f3
commit 89fbb06658

View File

@@ -173,12 +173,7 @@ exports.VariableDeclaration = function (node, print, parent) {
this.printJoin(print, node.declarations, ", ");
if (
parent.type !== "ForStatement" &&
parent.type !== "ForInStatement" &&
parent.type !== "ForOfStatement" &&
parent.type !== "ForOfStatement"
) {
if (!t.isFor(parent)) {
this.semicolon();
}
};