This commit is contained in:
Amjad Masad
2016-03-07 18:26:51 -08:00
parent 77c7cc5363
commit 3bebc3a7ca

View File

@@ -346,12 +346,11 @@ class BlockScoping {
let parentScope = scope.getFunctionParent();
let letRefs = this.letReferences;
const i = 0;
for (let key in letRefs) {
let ref = letRefs[key];
const binding = scope.getBinding(ref.name);
if (!binding) continue;
if (binding.kind === 'let' || binding.kind === 'const') {
if (binding.kind === "let" || binding.kind === "const") {
scope.removeOwnBinding(ref.name);
parentScope.registerBinding("var", binding.path);
}