diff --git a/package/src/components/Attachment/Gallery.tsx b/package/src/components/Attachment/Gallery.tsx index 06d86c307a..d7d1ed523e 100644 --- a/package/src/components/Attachment/Gallery.tsx +++ b/package/src/components/Attachment/Gallery.tsx @@ -308,6 +308,9 @@ const GalleryThumbnail = < }; const defaultOnPress = () => { + if ((thumbnail.type === 'video' && !thumbnail.thumb_url) || !thumbnail.url) { + return; + } if (thumbnail.type === 'video' && !isVideoPackageAvailable()) { // This condition is kinda unreachable, since we render videos as file attachment if the video // library is not installed. But doesn't hurt to have extra safeguard, in case of some customizations.