From becf4d7426106d07b48c92d6384e4f98b5d38031 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 28 Dec 2025 21:10:22 +0200 Subject: [PATCH] fix(note_icon): crash when reducing number of items --- apps/client/src/widgets/note_icon.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/note_icon.tsx b/apps/client/src/widgets/note_icon.tsx index 76d8cbed0..70d79fb65 100644 --- a/apps/client/src/widgets/note_icon.tsx +++ b/apps/client/src/widgets/note_icon.tsx @@ -155,7 +155,9 @@ function IconItemCell({ rowIndex, columnIndex, style, filteredIcons }: CellCompo filteredIcons: IconWithName[]; }>): React.JSX.Element { const iconIndex = rowIndex * 12 + columnIndex; - const iconData = filteredIcons[iconIndex]; + const iconData = filteredIcons[iconIndex] as IconWithName | undefined; + if (!iconData) return ; + const { id, terms, iconPack } = iconData; return (