diff --git a/src/pages/commonFeed/components/FeedLayout/FeedLayout.tsx b/src/pages/commonFeed/components/FeedLayout/FeedLayout.tsx index e045a84dbc..c26fe9a6e4 100644 --- a/src/pages/commonFeed/components/FeedLayout/FeedLayout.tsx +++ b/src/pages/commonFeed/components/FeedLayout/FeedLayout.tsx @@ -620,7 +620,13 @@ const FeedLayout: ForwardRefRenderFunction = ( }, [batchNumber]); useEffect(() => { - if (sharedFeedItemId && isTabletView && allFeedItems) { + if ( + isTabletView && + sharedFeedItemId && + allFeedItems.length > 0 && + allFeedItems.some((item) => item.itemId === sharedFeedItemId) + ) { + deleteQueryParam(QueryParamKey.Item, true); setActiveChatItem({ feedItemId: sharedFeedItemId }); } }, [sharedFeedItemId, isTabletView, allFeedItems]);