small patches

This commit is contained in:
ZXMushroom63 2025-03-02 15:08:23 +08:00
parent 35a66cd847
commit 681d22f28c
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
globalThis.ModAPIVersion = "v2.7";
globalThis.ModAPIVersion = "v2.7.1";
globalThis.doEaglerforge = true;
document.querySelector("title").innerText = `EaglerForge Injector ${ModAPIVersion}`;
document.querySelector("h1").innerText = `EaglerForge Injector ${ModAPIVersion}`;

View File

@ -771,7 +771,7 @@ globalThis.modapi_postinit = "(" + (() => {
if (!object) {
return null;
}
if (prop in object) {
if ((prop in object) && Object.keys(object).includes(prop)) {
return prop;
}
var possibleKeys = Object.keys(object).filter(x => { return x.startsWith(prop) });
@ -780,7 +780,7 @@ globalThis.modapi_postinit = "(" + (() => {
})
return possibleKeys.sort((a, b) => {
return a.length - b.length;
})[0] || null;
})[0] || prop;
}
ModAPI.util.modifyFunction = function (fn, patcherFn) {