diff --git a/projects/core/tokens/icon-resolver.ts b/projects/core/tokens/icon-resolver.ts index 2c3230374004..aee6c92c6f73 100644 --- a/projects/core/tokens/icon-resolver.ts +++ b/projects/core/tokens/icon-resolver.ts @@ -23,12 +23,10 @@ export function tuiInjectIconResolver(): TuiStringHandler { const icons = inject(TUI_ICON_REGISTRY); const resolver = inject(TUI_ICON_RESOLVER); - return (icon) => (!icon || icon.includes('/') ? icon : icons[icon] || resolver(icon)); + return (icon) => + !icon || icon.includes('/') ? icon : (icons[icon] ?? resolver(icon)); } export function tuiIconResolverProvider(useValue: TuiStringHandler): Provider { - return { - provide: TUI_ICON_RESOLVER, - useValue, - }; + return {provide: TUI_ICON_RESOLVER, useValue}; }