From 22519a18ac136e4dad69260aae32320ddda00ffe Mon Sep 17 00:00:00 2001 From: Beebles <102569435+beebls@users.noreply.github.com> Date: Sat, 23 Dec 2023 14:51:43 -0700 Subject: [PATCH] fix: themes with no preview image no longer bork --- src/pages/theme-manager/ExpandedView.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/theme-manager/ExpandedView.tsx b/src/pages/theme-manager/ExpandedView.tsx index c4f027c..653b9fb 100644 --- a/src/pages/theme-manager/ExpandedView.tsx +++ b/src/pages/theme-manager/ExpandedView.tsx @@ -255,7 +255,11 @@ export const ExpandedViewPage: VFC = () => { width={selectedImageWidth} height={selectedImageHeight} style={{ objectFit: "contain" }} - src={`https://api.deckthemes.com/blobs/${fullThemeData.images[focusedImage].id}`} + src={ + fullThemeData.images.length > 0 + ? `https://api.deckthemes.com/blobs/${fullThemeData.images?.[focusedImage]?.id}` + : `https://share.deckthemes.com/cssplaceholder.png` + } /> {fullThemeData.images.length > 1 && (