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

Commit 380a70f

Browse files
committed
fix linking bug (systemjs/systemjs#975)
1 parent be03106 commit 380a70f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"minimist": "^1.1.0",
4343
"mocha": "^2.0.1",
4444
"regenerator": "^0.8.9",
45-
"traceur": "0.0.91",
46-
"typescript": "next"
45+
"traceur": "0.0.93",
46+
"typescript": "^1.6.2"
4747
},
4848
"keywords": [
4949
"script",

src/loader.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,14 @@ function logloads(loads) {
366366
if (loader.loads[i].name == name) {
367367
existingLoad = loader.loads[i];
368368

369-
if(step == 'translate' && !existingLoad.source) {
369+
if (step == 'translate' && !existingLoad.source) {
370370
existingLoad.address = stepState.moduleAddress;
371371
proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));
372372
}
373373

374-
// a primary load -> use that existing linkset
375-
if (existingLoad.linkSets.length)
374+
// a primary load -> use that existing linkset if it is for the direct load here
375+
// otherwise create a new linkset unit
376+
if (existingLoad.linkSets.length && existingLoad.linkSets[0].loads[0].name == existingLoad.name)
376377
return existingLoad.linkSets[0].done.then(function() {
377378
resolve(existingLoad);
378379
});

0 commit comments

Comments
 (0)