|
|
|
|
@ -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) {
|
|
|
|
|
|