Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
fix depLoad already linked in dynamic require sfx case
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Mar 16, 2017
1 parent db73dd3 commit cd19b07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions templates/sfx-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,17 @@
for (var i = 0; i < deps.length; i++)
if (deps[i] === name) {
var depLoad = depLoads[i];
var depLink = depLoad.linkRecord;
var module;
if (seen.indexOf(depLoad) === -1)
module = doEvaluate(depLoad, depLoad.linkRecord, seen);
else
module = depLoad.linkRecord.moduleObj;
if (depLink) {
if (seen.indexOf(depLoad) === -1)
module = doEvaluate(depLoad, depLink, seen);
else
module = depLink.moduleObj;
}
else {
module = depLoad.module;
}
return module.__useDefault ? module.default : module;
}
};
Expand Down
2 changes: 1 addition & 1 deletion templates/sfx-core.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cd19b07

Please sign in to comment.