This commit is contained in:
ZXMushroom63 2024-10-23 16:23:20 +08:00
parent f514406422
commit 72ed7492c6

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);