keep function id location in block scoped function transformer

This commit is contained in:
Sebastian McKenzie
2015-01-22 17:20:19 +11:00
parent f63ce4ddd4
commit 2e0a185db6

View File

@@ -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))
]);