Skip to content

Commit

Permalink
Merge pull request #8544 from chuckdumont/work
Browse files Browse the repository at this point in the history
Factory method for require dependency in AMDRequireDependenciesBlock
  • Loading branch information
sokra committed Dec 30, 2018
2 parents 69dea22 + 1fd25dd commit 2e3e2a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/dependencies/AMDRequireDependenciesBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ module.exports = class AMDRequireDependenciesBlock extends AsyncDependenciesBloc
} else {
this.range = expr.range;
}
const dep = new AMDRequireDependency(this);
const dep = this.newRequireDependency();
dep.loc = loc;
this.addDependency(dep);
}

newRequireDependency() {
return new AMDRequireDependency(this);
}
};

0 comments on commit 2e3e2a0

Please sign in to comment.