Skip to content

Commit 55fdccc

Browse files
committed
fix: make it work with reassigned length
1 parent 316a341 commit 55fdccc

File tree

1 file changed

+3
-0
lines changed
  • packages/svelte/src/internal/client

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ export function proxy(value, options, parent = null, prev) {
306306
for (var i = value; i < /** @type {Source<number>} */ (s).v; i += 1) {
307307
var other_s = sources.get(i + '');
308308
if (other_s !== undefined) {
309+
if (typeof other_s.v === 'object' && other_s.v !== null && STATE_SYMBOL in other_s.v) {
310+
other_s.v[PROXY_ONCHANGE_SYMBOL](options?.onchange, true);
311+
}
309312
set(other_s, UNINITIALIZED);
310313
} else if (i in target) {
311314
// If the item exists in the original, we need to create a uninitialized source,

0 commit comments

Comments
 (0)