From b6451cbb5197b82190fc01ea1a476c3a52b92a53 Mon Sep 17 00:00:00 2001 From: leilzh Date: Mon, 21 Sep 2020 10:10:52 +0800 Subject: [PATCH] update the set --- .../client/src/recoilModel/dispatchers/notification.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Composer/packages/client/src/recoilModel/dispatchers/notification.ts b/Composer/packages/client/src/recoilModel/dispatchers/notification.ts index f30fc7a838..7579d19c77 100644 --- a/Composer/packages/client/src/recoilModel/dispatchers/notification.ts +++ b/Composer/packages/client/src/recoilModel/dispatchers/notification.ts @@ -21,8 +21,8 @@ export const addNotificationInternal = ({ set }: CallbackInterface, notification export const deleteNotificationInternal = ({ reset, set }: CallbackInterface, id: string) => { reset(notificationsState(id)); - set(notificationIdsState, (items) => { - return [...items].filter((item) => item !== id); + set(notificationIdsState, (notifications) => { + return notifications.filter((notification) => notification !== id); }); };