diff --git a/package/src/components/ImageGallery/components/ImageGalleryFooter.tsx b/package/src/components/ImageGallery/components/ImageGalleryFooter.tsx index d800c7334..a5ae6d6e2 100644 --- a/package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +++ b/package/src/components/ImageGallery/components/ImageGalleryFooter.tsx @@ -134,6 +134,9 @@ export const ImageGalleryFooterWithContext = < const share = async () => { setShareMenuOpen(true); try { + if (!shareImage || !deleteFile) { + return; + } const extension = photo.mime_type?.split('/')[1] || 'jpg'; const localFile = await saveFile({ fileName: `${photo.user?.id || 'ChatPhoto'}-${