Skip to content

Commit

Permalink
Freeze and thaw ImportSpecifier importedVar
Browse files Browse the repository at this point in the history
  • Loading branch information
mzgoddard committed Dec 11, 2017
1 parent 6efdb26 commit 0ddfcae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ HardHarmonyImportDependency.prototype.getReference = function() {
};
};

function HardHarmonyImportSpecifierDependency(importDependency, id, name, range, strictExportPresence) {
function HardHarmonyImportSpecifierDependency(importDependency, importedVar, id, name, range, strictExportPresence) {
Object.setPrototypeOf(this,
Object.setPrototypeOf(
new HarmonyImportSpecifierDependency(importDependency, null, id, name, range, strictExportPresence),
new HarmonyImportSpecifierDependency(importDependency, importedVar, id, name, range, strictExportPresence),
HardHarmonyImportSpecifierDependency.prototype
)
);
Expand Down
2 changes: 2 additions & 0 deletions lib/hard-harmony-dependency-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ HardHarmonyDependencyPlugin.prototype.apply = function(compiler) {
return {
type: 'HarmonyImportSpecifierDependency',
importDependency: freeze('dependency', null, dependency.importDependency, extra),
importedVar: dependency.importedVar,
id: dependency.id,
name: dependency.name,
range: dependency.range,
Expand Down Expand Up @@ -140,6 +141,7 @@ HardHarmonyDependencyPlugin.prototype.apply = function(compiler) {
else if (frozen.type === 'HarmonyImportSpecifierDependency') {
return new HardHarmonyImportSpecifierDependency(
thaw('dependency', null, frozen.importDependency, extra),
frozen.importedVar,
frozen.id,
frozen.name,
frozen.range,
Expand Down

0 comments on commit 0ddfcae

Please sign in to comment.