fix(note_icon): crash when reducing number of items

This commit is contained in:
Elian Doran 2025-12-28 21:10:22 +02:00
parent 082040c6e1
commit becf4d7426
No known key found for this signature in database

View File

@ -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 <span style={style as CSSProperties} />;
const { id, terms, iconPack } = iconData;
return (
<span