diff --git a/src/renderer/components/hotbar/hotbar-icon.tsx b/src/renderer/components/hotbar/hotbar-icon.tsx index bdd00859c2..d5d68c7c83 100644 --- a/src/renderer/components/hotbar/hotbar-icon.tsx +++ b/src/renderer/components/hotbar/hotbar-icon.tsx @@ -67,7 +67,10 @@ function onMenuItemClick(menuItem: CatalogEntityContextMenu) { } } -function getNameParts(name: string): string[] { +function getNameParts(name?: string) { + if (!name) { + return []; + } const byWhitespace = name.split(/\s+/); if (byWhitespace.length > 1) {