@babel/plugin-transform-block-scoping
Advanced tools
Comparing version 7.20.8 to 7.20.9
@@ -58,2 +58,7 @@ "use strict"; | ||
let binding = headPath.scope.getOwnBinding(name); | ||
if (!binding) { | ||
headPath.scope.crawl(); | ||
binding = headPath.scope.getOwnBinding(name); | ||
} | ||
const { | ||
@@ -63,3 +68,3 @@ usages, | ||
hasConstantViolations | ||
} = (0, _loop.getUsageInBody)(headPath.scope.getOwnBinding(name), path); | ||
} = (0, _loop.getUsageInBody)(binding, path); | ||
if (capturedInClosure) { | ||
@@ -124,3 +129,5 @@ markNeedsBodyWrap(); | ||
for (const name of bindingNames) { | ||
path.scope.getOwnBinding(name).kind = "var"; | ||
const binding = path.scope.getOwnBinding(name); | ||
if (!binding) continue; | ||
binding.kind = "var"; | ||
} | ||
@@ -127,0 +134,0 @@ if (isInLoop(path) && !(0, _loop.isVarInLoopHead)(path) || dynamicTDZNames.length > 0) { |
{ | ||
"name": "@babel/plugin-transform-block-scoping", | ||
"version": "7.20.8", | ||
"version": "7.20.9", | ||
"description": "Compile ES2015 block scoping (const and let) to ES5", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
82780
682