From 72ed7492c612c6c16ecb92579dd90f823931bb95 Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Wed, 23 Oct 2024 16:23:20 +0800 Subject: [PATCH] Fix bug --- postinit.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postinit.js b/postinit.js index 4b904ab..bbad2d1 100644 --- a/postinit.js +++ b/postinit.js @@ -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);