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

Commit

Permalink
System.import use direct parentName argument
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Apr 4, 2015
1 parent 4e9d3bd commit 537e7d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,12 +659,12 @@ function logloads(loads) {
return !!this._loader.modules[name];
},
// 26.3.3.8
'import': function(name, options) {
'import': function(name, parentName) {
// run normalize first
var loaderObj = this;

// added, see https://bugs.ecmascript.org/show_bug.cgi?id=2659
return Promise.resolve(loaderObj.normalize(name, options && options.name, options && options.address))
return Promise.resolve(loaderObj.normalize(name, parentName))
.then(function(name) {
var loader = loaderObj._loader;

Expand All @@ -674,7 +674,7 @@ function logloads(loads) {
}

return loader.importPromises[name] || createImportPromise(loaderObj, name,
loadModule(loader, name, options || {})
loadModule(loader, name, {})
.then(function(load) {
delete loader.importPromises[name];
return evaluateLoadedModule(loader, load);
Expand Down

0 comments on commit 537e7d2

Please sign in to comment.