FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ensureInstantiate fix · ModuleLoader/es-module-loader@a888c8a · GitHub

This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit a888c8a

Browse files
committed
ensureInstantiate fix
1 parent d2f1e70 commit a888c8a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎core/register-loader.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function createLoadRecord (key, registration) {
104104

105105
execute: undefined,
106106

107-
// this lock is necessary just in case a top level execure is called
107+
// this lock is necessary just in case a top level execute is called
108108
// while alreadu executing
109109
evaluated: false,
110110

@@ -190,7 +190,7 @@ RegisterLoader.prototype[Loader.resolveInstantiate] = function (key, parentKey)
190190
function ensureInstantiate (loader, load) {
191191
var link = load.linkRecord;
192192

193-
if (!link)
193+
if (!link || link.allInstantiated)
194194
return Promise.resolve(load);
195195

196196
if (link.error)
@@ -221,10 +221,10 @@ function ensureInstantiateAllDeps (loader, load, seen) {
221221

222222
// skip if already executed / already all instantiated
223223
if (!link || link.allInstantiated)
224-
return load;
224+
return Promise.resolve(load);
225225

226226
if (seen.indexOf(load) !== -1)
227-
return load;
227+
return Promise.resolve(load);
228228
seen.push(load);
229229

230230
var instantiateDepsPromises = Array(link.dependencies.length);
@@ -456,6 +456,7 @@ function ensureRegister (load) {
456456
throw new TypeError('Module instantiation did not call an anonymous or correctly named System.register.');
457457

458458
link.dependencies = registration[0];
459+
459460
load.importerSetters = [];
460461

461462
// dynamic module

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL