From 928f63df0f788a8949d6e56f5ecf50b863d457a2 Mon Sep 17 00:00:00 2001 From: Pouzor Date: Mon, 11 May 2026 19:44:20 +0200 Subject: [PATCH] fix(icons): narrow ICON_MAP lookup type for strict build tsc -b (used in npm run build) flagged TS2774 because LucideIcon is a function and therefore always truthy. Cast the lookup result to LucideIcon | undefined so the falsy branch becomes meaningful. --- frontend/src/utils/nodeIcons.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/nodeIcons.ts b/frontend/src/utils/nodeIcons.ts index 9ec55b0..c781d0a 100644 --- a/frontend/src/utils/nodeIcons.ts +++ b/frontend/src/utils/nodeIcons.ts @@ -218,6 +218,6 @@ export function resolveCustomIcon(customIconKey?: string): ResolvedIcon | null { const slug = brandIconSlug(customIconKey) return { kind: 'brand', slug, url: brandIconUrl(slug) } } - const icon = ICON_MAP[customIconKey] + const icon = ICON_MAP[customIconKey] as LucideIcon | undefined return icon ? { kind: 'lucide', icon } : null }