From b5eb761645bfadcb31578f9a3a9f3cae979de90d Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Wed, 2 Oct 2024 16:32:47 +0800 Subject: [PATCH] array fix 2 --- postinit.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postinit.js b/postinit.js index b01ae95..5bc7031 100644 --- a/postinit.js +++ b/postinit.js @@ -311,12 +311,15 @@ globalThis.modapi_postinit = "(" + (() => { var reloadDeprecationWarnings = 0; const TeaVMArray_To_Recursive_BaseData_ProxyConf = { get(target, prop, receiver) { + var outputValue = Reflect.get(target, prop, receiver); + if (outputValue && typeof outputValue === "object" && !Array.isArray(outputValue)) { + return ModAPI.util.wrap(outputValue, target, this._corrective); + } if (prop === "getRef") { return function () { return target; } } - var outputValue = Reflect.get(target, prop, receiver); var wrapped = ModAPI.util.wrap(outputValue, target, this._corrective); if (wrapped) { return wrapped;