diff --git a/src/state.ts b/src/state.ts index 67260e7..ae385e6 100644 --- a/src/state.ts +++ b/src/state.ts @@ -70,7 +70,7 @@ class Observer { }; dismiss = (id?: number | string) => { - if (!id) { + if (typeof id !== undefined && id !== '') { this.toasts.forEach((toast) => { this.subscribers.forEach((subscriber) => subscriber({ id: toast.id, dismiss: true })); });