check for existence of node before checking it in let scoping

This commit is contained in:
Sebastian McKenzie
2014-11-19 12:12:49 +11:00
parent 221d78d2e2
commit d9d84c60b5

View File

@@ -260,7 +260,7 @@ LetScoping.prototype.checkFor = function () {
return false;
}
if (forParent && !node.label) {
if (forParent && node && !node.label) {
if (t.isBreakStatement(node)) {
has.hasBreak = true;
replace = t.returnStatement(t.literal("break"));