Update app.js

This commit is contained in:
Namhyeon Go 2024-07-22 00:08:00 +09:00 committed by GitHub
parent f2239e75a9
commit ebb254061d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

14
app.js
View File

@ -225,21 +225,15 @@ function require(pathname) {
if ('.js$.jse$.coffee$.ls$.ts$.re$.res$.enc$'.indexOf(suffix + '$') < 0) FN += ".js"; if ('.js$.jse$.coffee$.ls$.ts$.re$.res$.enc$'.indexOf(suffix + '$') < 0) FN += ".js";
if (cache[FN]) return cache[FN]; if (cache[FN]) return cache[FN];
var T = ''; var T = null;
if (FN.indexOf('://') > -1 && require._scriptProviders.length > 0) { if (FN.indexOf('://') > -1 && require._scriptProviders.length > 0) {
// get a script from a custom provider (e.g., remote server) // get a script from a custom provider (e.g., remote server)
var status = -1, i = 0; while (T == null && i < require._scriptProviders.length) {
while (status < 0 && i < require._scriptProviders.length) {
try { try {
var result = require._scriptProviders[i](FN); T = require._scriptProviders[i](FN) || null;
status = result.status;
if (status > -1) {
T = result.responseText;
}
break; break;
} catch (e) { } catch (e) {
status = -1; T = null;
T = '';
} }
i++; i++;
} }