pull/18298/head
Rich Harris 1 week ago
parent 2f7ca483d3
commit 1467163906

@ -411,10 +411,12 @@ export class Batch {
// causing an effect and therefore a root to be scheduled again. We need to traverse the current batch
// once more in that case - most of the time this will just clean up dirty branches.
if (this.#roots.length > 0) {
next_batch ??= this;
const batch = next_batch;
batch.#roots.push(...this.#roots.filter((r) => !batch.#roots.includes(r)));
if (next_batch !== null) {
const batch = next_batch;
batch.#roots.push(...this.#roots.filter((r) => !batch.#roots.includes(r)));
} else {
next_batch = this;
}
}
if (next_batch !== null) {

Loading…
Cancel
Save