From d9d84c60b542459fbb0c629519528cd200dfaba1 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 19 Nov 2014 12:12:49 +1100 Subject: [PATCH] check for existence of node before checking it in let scoping --- lib/6to5/transformation/transformers/let-scoping.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/6to5/transformation/transformers/let-scoping.js b/lib/6to5/transformation/transformers/let-scoping.js index 7998e9e362..6741207e7e 100644 --- a/lib/6to5/transformation/transformers/let-scoping.js +++ b/lib/6to5/transformation/transformers/let-scoping.js @@ -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"));