array fix 2

This commit is contained in:
ZXMushroom63 2024-10-02 16:32:47 +08:00
parent f4eae3baf1
commit b5eb761645

View File

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