From 2fa3c915f981ade58ab79f7b929d8ba5c3928981 Mon Sep 17 00:00:00 2001 From: Pavel Meyer Date: Wed, 20 Nov 2024 15:59:02 +0300 Subject: [PATCH] Update reducer.ts --- src/store/states/common/reducer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/store/states/common/reducer.ts b/src/store/states/common/reducer.ts index 57c3ee1dd..85088be35 100644 --- a/src/store/states/common/reducer.ts +++ b/src/store/states/common/reducer.ts @@ -783,13 +783,13 @@ export const reducer = createReducer(initialState) // Remove sharedFeedItemId from feedItems and pinnedFeedItems if (sharedFeedItemId) { nextState.feedItems[commonId].data = - nextState.feedItems[commonId]?.data && - nextState.feedItems[commonId].data.filter( + nextState.feedItems?.[commonId]?.data && + nextState.feedItems[commonId]?.data?.filter( (item) => item?.itemId !== sharedFeedItemId, ); nextState.pinnedFeedItems[commonId].data = - nextState.pinnedFeedItems[commonId]?.data && - nextState.pinnedFeedItems[commonId].data.filter( + nextState.pinnedFeedItems?.[commonId]?.data && + nextState.pinnedFeedItems[commonId]?.data?.filter( (item) => item?.itemId !== sharedFeedItemId, ); }