Disallow duplicated AST nodes (#11807)
This commit is contained in:
@@ -337,7 +337,9 @@ const rewriteReferencesVisitor = {
|
||||
path
|
||||
.get("left")
|
||||
.replaceWith(
|
||||
t.variableDeclaration("let", [t.variableDeclarator(newLoopId)]),
|
||||
t.variableDeclaration("let", [
|
||||
t.variableDeclarator(t.cloneNode(newLoopId)),
|
||||
]),
|
||||
);
|
||||
scope.registerDeclaration(path.get("left"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user