fix: only batch array methods if there's an `onchange` function

pull/15579/head
paoloricciuti 8 months ago
parent e2c2580e81
commit f013e8722e

@ -172,7 +172,11 @@ export function proxy(value, options, parent = null, prev) {
v = Reflect.get(target, prop, receiver); v = Reflect.get(target, prop, receiver);
if (is_proxied_array && array_methods.includes(/** @type {string} */ (prop))) { if (
is_proxied_array &&
array_methods.includes(/** @type {string} */ (prop)) &&
options?.onchange != null
) {
return batch_onchange(v); return batch_onchange(v);
} }

Loading…
Cancel
Save