Skip to content

Commit

Permalink
fix: themes with no preview image no longer bork
Browse files Browse the repository at this point in the history
  • Loading branch information
beebls committed Dec 23, 2023
1 parent 827e1af commit 22519a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/theme-manager/ExpandedView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 && (
<div className="image-number-container">
Expand Down

0 comments on commit 22519a1

Please sign in to comment.