fix: use better toasts id fix
This commit is contained in:
1 file changed
+1
-1
@@ -43,7 +43,7 @@ export function toast({
|
|||||||
let id = 0
|
let id = 0
|
||||||
|
|
||||||
toasts.update(toasts => {
|
toasts.update(toasts => {
|
||||||
id = Math.max(...toasts.map(t => t.id)) ?? 0 + 1
|
id = Math.max(0, ...toasts.map(t => t.id)) + 1
|
||||||
|
|
||||||
return [
|
return [
|
||||||
...toasts,
|
...toasts,
|
||||||
|
|||||||
Reference in new issue
Block a user