fix corrective proxy setters

This commit is contained in:
ZXMushroom63 2025-01-30 17:44:07 +08:00
parent 393f6fd2e7
commit 9f9d91f6a3

View File

@ -538,7 +538,11 @@ globalThis.modapi_postinit = "(" + (() => {
return outputValue;
},
set(object, prop, value) {
var corrective = !!this._corrective;
var outProp = "$" + prop;
if (corrective) {
outProp = ModAPI.util.getNearestProperty(target, outProp);
}
object[outProp] = value;
return true;
},