mirror of
https://github.com/zadam/trilium.git
synced 2026-01-01 12:14:24 +01:00
fix(note_icon): crash when reducing number of items
This commit is contained in:
parent
082040c6e1
commit
becf4d7426
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user