From 2e0a185db682dd898700c284e2bebaad39610781 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 22 Jan 2015 17:20:19 +1100 Subject: [PATCH] keep function id location in block scoped function transformer --- .../transformation/transformers/spec/block-scoped-functions.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/6to5/transformation/transformers/spec/block-scoped-functions.js b/lib/6to5/transformation/transformers/spec/block-scoped-functions.js index edae11d544..1f7f4c7ef0 100644 --- a/lib/6to5/transformation/transformers/spec/block-scoped-functions.js +++ b/lib/6to5/transformation/transformers/spec/block-scoped-functions.js @@ -11,9 +11,6 @@ exports.BlockStatement = function (node, parent) { var func = node.body[i]; if (!t.isFunctionDeclaration(i)) continue; - // this is to avoid triggering the TDZ detection - func.id.loc = null; - var declar = t.variableDeclaration("let", [ t.variableDeclarator(func.id, t.toExpression(func)) ]);