This commit is contained in:
2023-09-22 16:55:26 +01:00
parent e8519daa47
commit 8c7fbed191
18 changed files with 276 additions and 106 deletions

View File

@ -35,9 +35,7 @@ export abstract class ExternalStore<TSnapshot> {
protected notifyChange(sn?: TSnapshot) {
this.#changed = true;
if (this.#hooks.length > 0) {
queueMicrotask(() => {
this.#hooks.forEach(h => h.fn(sn));
});
this.#hooks.forEach(h => h.fn(sn));
}
}