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, ); }