From 6a619240faa895efbd2bf290ddc2fdf3621eaa4f Mon Sep 17 00:00:00 2001 From: jeffvli Date: Mon, 18 Nov 2024 20:17:33 -0800 Subject: [PATCH] Handle potential undefined value on CardRows (#834) --- src/renderer/components/card/album-card.tsx | 2 +- src/renderer/components/card/poster-card.tsx | 2 +- src/renderer/components/virtual-grid/grid-card/default-card.tsx | 2 +- src/renderer/components/virtual-grid/grid-card/poster-card.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/card/album-card.tsx b/src/renderer/components/card/album-card.tsx index aa665758b..7e58cc4da 100644 --- a/src/renderer/components/card/album-card.tsx +++ b/src/renderer/components/card/album-card.tsx @@ -202,7 +202,7 @@ export const AlbumCard = ({ - {cardRows.map((_row: CardRow, index: number) => ( + {(cardRows || []).map((_row: CardRow, index: number) => ( - {controls.cardRows.map((row, index) => ( + {(controls?.cardRows || []).map((row, index) => ( - {controls.cardRows.map((row, index) => ( + {(controls?.cardRows || []).map((row, index) => ( - {controls.cardRows.map((row, index) => ( + {(controls?.cardRows || []).map((row, index) => (