Merge pull request #27 from eaglerforge/main

Fix bug
This commit is contained in:
ZXMushroom63 2024-10-23 16:25:49 +08:00 committed by GitHub
commit 09c08bf97f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -602,6 +602,9 @@ globalThis.modapi_postinit = "(" + (() => {
if (!object) {
return null;
}
if (prop in object) {
return prop;
}
var possibleKeys = Object.keys(object).filter(x => { return x.startsWith(prop) });
possibleKeys = possibleKeys.filter(x => {
return Number.isFinite(parseInt(x.substring(prop.length))) || (x.substring(prop.length).length === 0);