diff --git a/src/components/post/post-desktop/post-menu-desktop/post-menu-desktop.tsx b/src/components/post/post-desktop/post-menu-desktop/post-menu-desktop.tsx index 6c19f7ff..a363b952 100644 --- a/src/components/post/post-desktop/post-menu-desktop/post-menu-desktop.tsx +++ b/src/components/post/post-desktop/post-menu-desktop/post-menu-desktop.tsx @@ -96,7 +96,7 @@ const ViewOnButton = ({ cid, isDescription, isRules, subplebbitAddress, onClose }; const PostMenuDesktop = ({ post }: { post: Comment }) => { - const { cid, isDescription, isRules, link, subplebbitAddress } = post; + const { cid, isDescription, isRules, link, postCid, subplebbitAddress } = post || {}; const commentMediaInfo = getCommentMediaInfo(post); const { thumbnail, type, url } = commentMediaInfo || {}; const [menuBtnRotated, setMenuBtnRotated] = useState(false); diff --git a/src/components/post/post-mobile/post-menu-mobile/post-menu-mobile.tsx b/src/components/post/post-mobile/post-menu-mobile/post-menu-mobile.tsx index e5bb94a7..85ad88bb 100644 --- a/src/components/post/post-mobile/post-menu-mobile/post-menu-mobile.tsx +++ b/src/components/post/post-mobile/post-menu-mobile/post-menu-mobile.tsx @@ -59,7 +59,7 @@ const ViewOnButtons = ({ cid, isDescription, isRules, subplebbitAddress, onClose }; const PostMenuMobile = ({ post }: { post: Comment }) => { - const { cid, isDescription, isRules, link, subplebbitAddress } = post; + const { cid, isDescription, isRules, link, subplebbitAddress } = post || {}; const commentMediaInfo = getCommentMediaInfo(post); const { thumbnail, type, url } = commentMediaInfo || {}; const [isMenuOpen, setIsMenuOpen] = useState(false);