Skip to content

Commit 71c12ef

Browse files
committed
Got paths array working, but still needs evaluation.
1 parent 262c60a commit 71c12ef

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

require.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ var requirejs, require, define;
628628
noLoads = [],
629629
stillLoading = false,
630630
needCycleCheck = true,
631-
map, modId, err;
631+
map, modId, err, usingPathFallback;
632632

633633
//Do not bother if this call was a result of a cycle break.
634634
if (inCheckLoaded) {
@@ -660,6 +660,7 @@ var requirejs, require, define;
660660
//Pop off the first array value, since it failed, and
661661
//retry
662662
pathConfig.shift();
663+
usingPathFallback = true;
663664
stillLoading = true;
664665
context.undef(modId);
665666
context.require([modId]);
@@ -720,7 +721,7 @@ var requirejs, require, define;
720721
//If still waiting on loads, and the waiting load is something
721722
//other than a plugin resource, or there are still outstanding
722723
//scripts, then just try back later.
723-
if (!expired && stillLoading) {
724+
if ((!expired || usingPathFallback) && stillLoading) {
724725
//Something is still waiting to load. Wait for it, but only
725726
//if a timeout is not already in effect.
726727
if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {

tests/all.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ if (typeof Worker !== "undefined") {
112112
doh.registerUrl("workers", "../workers.html");
113113
}
114114

115+
doh.registerUrl("pathArray", "../pathArray/pathArray.html", 8000);
116+
doh.registerUrl("pathArrayFail", "../pathArray/pathArrayFail.html", 8000);
117+
115118
doh.registerUrl("undef", "../undef/undef.html", 8000);
116119
doh.registerUrl("undefLocal", "../undef/undefLocal.html", 8000);
117120
doh.registerUrl("errorContinue", "../error/errorContinue.html", 8000);

tests/pathArray/pathArray.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<script type="text/javascript" src="../doh/runner.js"></script>
77
<script type="text/javascript" src="../doh/_browserRunner.js"></script>
88
<script type="text/javascript">
9-
var master = new doh.Deferred();
9+
var master = new doh.Deferred(),
10+
threwError = false;
1011

1112
requirejs.onError = function (err) {
1213
threwError = true;

0 commit comments

Comments
 (0)