keep function id location in block scoped function transformer
This commit is contained in:
@@ -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))
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user