Skip to content

Commit

Permalink
Add missing scopes when adding reference to scope tracker
Browse files Browse the repository at this point in the history
Fixes "Cannot read property 'add' of undefined" error. babel#792 babel#556
  • Loading branch information
devongovett authored May 20, 2018
1 parent 01eac1c commit 33e84a8
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = class ScopeTracker {
addReference(scope, binding, name) {
let parent = scope;
do {
this.addScope(parent);
this.references.get(parent).add(name);
if (!binding) {
throw new Error(
Expand Down

0 comments on commit 33e84a8

Please sign in to comment.