improve 6to5-node and fix register hook

This commit is contained in:
Sebastian McKenzie
2014-10-08 10:17:50 +11:00
parent fa86f58389
commit b194461ba3
3 changed files with 19 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ exports.ForStatement = function (node) {
};
_.each(node.body, function (child) {
if (child.type === "VariableDeclaration" && child.kind === "const") {
if (child && child.type === "VariableDeclaration" && child.kind === "const") {
_.each(child.declarations, function (declar) {
var name = declar.id.name;
check(declar, name);