Parcours Playwright (make test-browser), toast qui ne bloque plus les touches
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
41d5e44daa
commit
e02d8f315a
+6
-1
@@ -37,7 +37,12 @@ store.load(await db.list());
|
||||
const journal = {
|
||||
/** @param {import("./domain/events.js").DomainEvent[]} events */
|
||||
async merge(events) {
|
||||
const added = await db.add(events);
|
||||
// On n'envoie que les nouveaux : un id déjà présent fait échouer la
|
||||
// transaction d'event-store.add (l'erreur remonte à tx.onerror malgré
|
||||
// preventDefault), signalé au domaine infra.
|
||||
const known = new Set(store.getEvents().map((e) => e.id));
|
||||
const fresh = events.filter((e) => !known.has(e.id) && (known.add(e.id), true));
|
||||
const added = fresh.length ? await db.add(fresh) : 0;
|
||||
store.load(await db.list());
|
||||
return added;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user