From aacb9237466c42b2e26f52a6588e6307c137db6e Mon Sep 17 00:00:00 2001 From: Ashm Walia <40498934+ashmgarv@users.noreply.github.com> Date: Mon, 2 Nov 2020 10:19:44 -0800 Subject: [BUG FIX] -> 1 : Bottom of moments screen cut off 2 : Social media data double check [FRONTEND] (#84) * BUG FIX -> 1 : Bottom of moments screen cut off 2 : Check for existence of accountData before displaying the same * small change * added more exception checking * FIX package error Co-authored-by: Ivan Chen --- src/components/taggs/TaggPost.tsx | 2 +- src/components/taggs/TwitterTaggPost.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/taggs') diff --git a/src/components/taggs/TaggPost.tsx b/src/components/taggs/TaggPost.tsx index 071dbfc4..6ad9158b 100644 --- a/src/components/taggs/TaggPost.tsx +++ b/src/components/taggs/TaggPost.tsx @@ -14,7 +14,7 @@ const TaggPost: React.FC = ({post}) => { // Post with image and footer that shows caption return ( - {post.media_url.length === 1 && post.media_url[0] !== null ? ( + {post.media_url?.length === 1 && post.media_url[0] !== null ? ( = ({ )} {/* Second part of content is an image or empty */} - {post.media_url.length !== 0 ? ( + {post.media_url?.length !== 0 ? ( {post.media_url.length === 1 && post.media_url[0] !== null ? ( @@ -111,7 +111,7 @@ const TwitterTaggPost: React.FC = ({ style={styles.replyShowThisThread} onPress={() => { if (post.in_reply_to?.permalink) { - Linking.openURL(post.in_reply_to.permalink); + Linking.openURL(post.in_reply_to?.permalink || ''); } }}> Show this thread -- cgit v1.2.3-70-g09d2