From 6bba64707379ef7f40d9cf38a29ea5142a0393ff Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 28 May 2026 17:19:36 -0400 Subject: [PATCH] working? --- .../svelte/src/internal/client/reactivity/batch.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/svelte/src/internal/client/reactivity/batch.js b/packages/svelte/src/internal/client/reactivity/batch.js index dcc02793ce..be1e6f2d82 100644 --- a/packages/svelte/src/internal/client/reactivity/batch.js +++ b/packages/svelte/src/internal/client/reactivity/batch.js @@ -532,6 +532,16 @@ export class Batch { // Mark is not guaranteed to not touch these, so we transfer them this.transfer_effects(batch.#dirty_effects); + for (const fn of batch.#commit_callbacks) { + this.#commit_callbacks.add(() => fn(batch)); + } + + for (const fn of batch.#discard_callbacks) { + this.#discard_callbacks.add(() => fn(batch)); + } + + this.settled().then(batch.#deferred?.resolve, batch.#deferred?.reject); + /** * mark all effects that depend on `batch.current`, except the * async effects that we just resolved (TODO unless they depend