diff options
Diffstat (limited to 'src/components/taggs')
| -rw-r--r-- | src/components/taggs/TaggPost.tsx | 2 | ||||
| -rw-r--r-- | src/components/taggs/TwitterTaggPost.tsx | 4 | 
2 files changed, 3 insertions, 3 deletions
| 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<TaggPostProps> = ({post}) => {      // Post with image and footer that shows caption      return (        <View style={styles.photoContainer}> -        {post.media_url.length === 1 && post.media_url[0] !== null ? ( +        {post.media_url?.length === 1 && post.media_url[0] !== null ? (            <Image              style={styles.imageWithMargin}              source={{uri: post.media_url[0]}} diff --git a/src/components/taggs/TwitterTaggPost.tsx b/src/components/taggs/TwitterTaggPost.tsx index d0d066c6..e2dca115 100644 --- a/src/components/taggs/TwitterTaggPost.tsx +++ b/src/components/taggs/TwitterTaggPost.tsx @@ -56,7 +56,7 @@ const TwitterTaggPost: React.FC<TwitterTaggPostProps> = ({            <React.Fragment />          )}          {/* Second part of content is an image or empty */} -        {post.media_url.length !== 0 ? ( +        {post.media_url?.length !== 0 ? (            <View style={styles.imageContainer}>              {post.media_url.length === 1 && post.media_url[0] !== null ? (                <Image style={styles.image} source={{uri: post.media_url[0]}} /> @@ -111,7 +111,7 @@ const TwitterTaggPost: React.FC<TwitterTaggPostProps> = ({                  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 | 
