From 47fc1e2e26ff35d7eaabb3312684c4ad91141bb2 Mon Sep 17 00:00:00 2001 From: James Xylight Date: Fri, 4 Jul 2025 20:36:19 -0700 Subject: [PATCH] fix: use better toasts id fix --- src/lib/mono/toast/toasts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/mono/toast/toasts.ts b/src/lib/mono/toast/toasts.ts index f8aeee1c..5cd39980 100644 --- a/src/lib/mono/toast/toasts.ts +++ b/src/lib/mono/toast/toasts.ts @@ -43,7 +43,7 @@ export function toast({ let id = 0 toasts.update(toasts => { - id = Math.max(...toasts.map(t => t.id)) ?? 0 + 1 + id = Math.max(0, ...toasts.map(t => t.id)) + 1 return [ ...toasts,