Update updateScopeInfo method to use moveBindingTo
This commit is contained in:
parent
8b4b02a5fb
commit
3dd80a6b14
@ -352,7 +352,8 @@ class BlockScoping {
|
||||
const binding = scope.getBinding(ref.name);
|
||||
if (!binding) continue;
|
||||
if (binding.kind === "let" || binding.kind === "const") {
|
||||
parentScope.registerBinding("var", binding.path);
|
||||
binding.kind = 'var';
|
||||
scope.moveBindingTo(ref.name, parentScope);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user