mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-11 16:35:13 +00:00
Update app.js
This commit is contained in:
parent
f2239e75a9
commit
ebb254061d
14
app.js
14
app.js
|
@ -225,21 +225,15 @@ function require(pathname) {
|
|||
if ('.js$.jse$.coffee$.ls$.ts$.re$.res$.enc$'.indexOf(suffix + '$') < 0) FN += ".js";
|
||||
if (cache[FN]) return cache[FN];
|
||||
|
||||
var T = '';
|
||||
var T = null;
|
||||
if (FN.indexOf('://') > -1 && require._scriptProviders.length > 0) {
|
||||
// get a script from a custom provider (e.g., remote server)
|
||||
var status = -1, i = 0;
|
||||
while (status < 0 && i < require._scriptProviders.length) {
|
||||
while (T == null && i < require._scriptProviders.length) {
|
||||
try {
|
||||
var result = require._scriptProviders[i](FN);
|
||||
status = result.status;
|
||||
if (status > -1) {
|
||||
T = result.responseText;
|
||||
}
|
||||
T = require._scriptProviders[i](FN) || null;
|
||||
break;
|
||||
} catch (e) {
|
||||
status = -1;
|
||||
T = '';
|
||||
T = null;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user