Skip to content

Commit

Permalink
fix: transform-block-scoping accesses properties of null (#15301)
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
liuxingbaoyu committed Dec 22, 2022
1 parent fad1c80 commit 1cbbbdd
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -10,6 +10,8 @@ export function validateUsage(

for (const name of Object.keys(path.getBindingIdentifiers())) {
const binding = path.scope.getBinding(name);
// binding may be null. ref: https://github.com/babel/babel/issues/15300
if (!binding) continue;
if (tdzEnabled) {
if (injectTDZChecks(binding, state)) dynamicTDZNames.push(name);
}
Expand Down

0 comments on commit 1cbbbdd

Please sign in to comment.