Skip to content

Commit b3c2e46

Browse files
committed
fixed: toasts vanish
1 parent 9a37384 commit b3c2e46

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/web/src/lib/stores/toasts.svelte.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ class Toaster {
99
addToast(text: string) {
1010
const id = crypto.randomUUID()
1111
this.#toasts = [...this.#toasts, { id, text }]
12-
setTimeout(() => this.#toasts.filter((el) => el.id !== id), 5000)
12+
setTimeout(() => {
13+
this.#toasts = this.#toasts.filter((el) => el.id !== id)
14+
}, 5000)
1315
}
1416

1517
get toasts() {

0 commit comments

Comments
 (0)