diff --git a/src/core/use-toaster.ts b/src/core/use-toaster.ts index 9534c85..6032be8 100644 --- a/src/core/use-toaster.ts +++ b/src/core/use-toaster.ts @@ -14,6 +14,10 @@ export const useToaster = (toastOptions?: DefaultToastOptions) => { const now = Date.now(); const timeouts = toasts.map((t) => { + if (t.duration === -1) { + return; + } + const durationLeft = (t.duration || 0) + t.pauseDuration - (now - t.createdAt);