diff --git a/src/app/docs/layout.tsx b/src/app/docs/layout.tsx index 74367a31..0863476e 100644 --- a/src/app/docs/layout.tsx +++ b/src/app/docs/layout.tsx @@ -61,11 +61,10 @@ const iconMap: Record> = { function NavIcon({ iconName, ...props }: { iconName: string } & IconProps) { const Icon = iconMap[iconName]; - return Icon ? ( - - ) : ( - ? - ); + if (!Icon) { + throw new Error(`Unknown icon name: ${iconName}`); + } + return ; } // Return a navigation tree UI for the DocsTree.