From 5514ed7f372df35f2e01e834cdf30621777e5fbd Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Fri, 24 Jun 2022 17:17:42 +0200 Subject: [PATCH] fix: Fix crash when uploading attachment --- client/src/components/CardModal/Attachments/Attachments.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/CardModal/Attachments/Attachments.jsx b/client/src/components/CardModal/Attachments/Attachments.jsx index b2eea422..f8a3a2c4 100644 --- a/client/src/components/CardModal/Attachments/Attachments.jsx +++ b/client/src/components/CardModal/Attachments/Attachments.jsx @@ -58,7 +58,7 @@ const Attachments = React.memo( }, [toggleAllVisible]); const galleryItemsNode = items.map((item, index) => { - const isPdf = item.url.endsWith('.pdf'); + const isPdf = item.url && item.url.endsWith('.pdf'); let props; if (item.image) {