From 9bab80f312ebeca9435be193d791f841761b74d6 Mon Sep 17 00:00:00 2001 From: lxj <1176891456@qq.com> Date: Mon, 22 Jul 2024 17:08:59 +0800 Subject: [PATCH] fix: issue #367 --- src/core/store.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/store.ts b/src/core/store.ts index 506978a..aa04790 100644 --- a/src/core/store.ts +++ b/src/core/store.ts @@ -116,6 +116,7 @@ export const reducer = (state: State, action: Action): State => { return { ...state, + pausedAt: undefined, toasts: state.toasts.map((t) => t.id === toastId || toastId === undefined ? { @@ -129,11 +130,13 @@ export const reducer = (state: State, action: Action): State => { if (action.toastId === undefined) { return { ...state, + pausedAt: undefined, toasts: [], }; } return { ...state, + pausedAt: undefined, toasts: state.toasts.filter((t) => t.id !== action.toastId), };