From 66386b44370de7d75c28b7fe12c35814561af82f Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Sun, 26 Jan 2025 14:28:06 +0800 Subject: [PATCH] fix array bug --- postinit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postinit.js b/postinit.js index 64c3e9b..6a0cab4 100644 --- a/postinit.js +++ b/postinit.js @@ -189,9 +189,9 @@ globalThis.modapi_postinit = "(" + (() => { if (!disableFunctions && outputValue && typeof outputValue === "function" && target) { return function (...args) { var xOut = outputValue.apply(target, args); - if (xOut && typeof xOut === "object" && Array.isArray(xOut.data) && typeof outputValue.type === "function") { + if (xOut && typeof xOut === "object" && Array.isArray(xOut.data) && typeof xOut.type === "function") { if (corrective) { - return new Proxy(outputValue.data, CorrectiveArray); + return new Proxy(xOut.data, CorrectiveArray); } return new Proxy(xOut.data, ModAPI.util.TeaVMArray_To_Recursive_BaseData_ProxyConf); }