Update app.js

This commit is contained in:
Namhyeon Go 2021-06-21 03:17:58 +09:00 committed by GitHub
parent 607a3134bc
commit 9f3fe327d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

22
app.js
View File

@ -156,8 +156,10 @@ if (typeof(CreateObject) !== "function") {
/** /**
* @FN {string} The name of the file. * @FN {string} The name of the file.
*/ */
function require(FN) { function require(FN, flag) {
var cache = require.__cache = require.__cache || {}; var cache = require.__cache = require.__cache || {};
var flag = (typeof(flag) !== "number" ? 0 : flag);
if (FN.substr(FN.length - 3) !== '.js') FN += ".js"; if (FN.substr(FN.length - 3) !== '.js') FN += ".js";
if (cache[FN]) return cache[FN]; if (cache[FN]) return cache[FN];
@ -206,11 +208,15 @@ function require(FN) {
+ FN; + FN;
// execute function // execute function
try { try {
cache[FN] = eval(T); if (flag < 1) {
} catch (e) { cache[FN] = eval(T);
console.error("PARSE ERROR! ", e.number, ", ", e.description, ", FN=", FN); } else {
} eval(T);
}
} catch (e) {
console.error("PARSE ERROR! ", e.number, ", ", e.description, ", FN=", FN);
}
// check type of callback return // check type of callback return
if (typeof(cache[FN]) === "object") { if (typeof(cache[FN]) === "object") {
@ -290,10 +296,10 @@ var ModuleObject = function() {
}; };
// JSON 2 // JSON 2
//_require("app/assets/js/json2"); require("app/assets/js/json2", 1);
// JSON 3 was a JSON polyfill for older JavaScript platforms // JSON 3 was a JSON polyfill for older JavaScript platforms
require("app/assets/js/json3-3.3.2.min"); //var JSON = require("app/assets/js/json3-3.3.2.min");
// Babel Polyfill (7.12.1) // Babel Polyfill (7.12.1)
require("app/assets/js/babel-polyfill-7.12.1.edited"); require("app/assets/js/babel-polyfill-7.12.1.edited");