From b1573b51bfd694176b96b2333021e1911ebc7034 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Mon, 4 Nov 2024 15:27:52 +0530 Subject: [PATCH] fix: tests for audio controller --- .../components/ImageGallery/components/ImageGalleryFooter.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/src/components/ImageGallery/components/ImageGalleryFooter.tsx b/package/src/components/ImageGallery/components/ImageGalleryFooter.tsx index d800c7334f..a5ae6d6e2f 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'}-${