Skip to content

Commit f013e87

Browse files
committed
fix: only batch array methods if there's an onchange function
1 parent e2c2580 commit f013e87

File tree

1 file changed

+5
-1
lines changed
  • packages/svelte/src/internal/client

1 file changed

+5
-1
lines changed

packages/svelte/src/internal/client/proxy.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ export function proxy(value, options, parent = null, prev) {
172172

173173
v = Reflect.get(target, prop, receiver);
174174

175-
if (is_proxied_array && array_methods.includes(/** @type {string} */ (prop))) {
175+
if (
176+
is_proxied_array &&
177+
array_methods.includes(/** @type {string} */ (prop)) &&
178+
options?.onchange != null
179+
) {
176180
return batch_onchange(v);
177181
}
178182

0 commit comments

Comments
 (0)