From 0609b40f81356978e6b44a2a4afb706517a8025d Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Tue, 4 Jan 2022 13:40:52 +0000 Subject: [PATCH] fix: assume attachment URL is volatile --- .../common/messaging/attachments/AttachmentActions.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/common/messaging/attachments/AttachmentActions.tsx b/src/components/common/messaging/attachments/AttachmentActions.tsx index daba3f7a..cd875061 100644 --- a/src/components/common/messaging/attachments/AttachmentActions.tsx +++ b/src/components/common/messaging/attachments/AttachmentActions.tsx @@ -25,9 +25,9 @@ export default function AttachmentActions({ attachment }: Props) { const client = useContext(AppContext); const { filename, metadata, size } = attachment; - const url = client.generateFileURL(attachment)!; + const url = client.generateFileURL(attachment); const open_url = `${url}/${filename}`; - const download_url = url.replace("attachments", "attachments/download"); + const download_url = url?.replace("attachments", "attachments/download"); const filesize = determineFileSize(size);