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

Commit e36fa26

Browse files
committed
fix race conditions (systemjs/systemjs#644)
1 parent fdb52e8 commit e36fa26

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/loader.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ function logloads(loads) {
417417
}
418418
// 15.2.5.2.2
419419
function addLoadToLinkSet(linkSet, load) {
420+
if (load.status == 'failed')
421+
return;
422+
420423
console.assert(load.status == 'loading' || load.status == 'loaded', 'loading or loaded on link set');
421424

422425
for (var i = 0, l = linkSet.loads.length; i < l; i++)
@@ -434,6 +437,9 @@ function logloads(loads) {
434437
var loader = linkSet.loader;
435438

436439
for (var i = 0, l = load.dependencies.length; i < l; i++) {
440+
if (!load.dependencies[i])
441+
continue;
442+
437443
var name = load.dependencies[i].value;
438444

439445
if (loader.modules[name])

0 commit comments

Comments
 (0)