Skip to content

Commit a12128b

Browse files
committed
refactor: sidebar-nav hasIcon()
1 parent 299d284 commit a12128b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

projects/coreui/angular/src/lib/sidebar/app-sidebar-nav.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ export class SidebarNavHelper {
4040
const classes = {
4141
'nav-icon': true
4242
};
43-
const icon = item.icon;
44-
classes[icon] = this.hasIcon(item);
43+
if (this.hasIcon(item)) {
44+
const icon = item.icon;
45+
classes[icon] = this.hasIcon(item);
46+
}
4547
return classes;
4648
}
4749
}

0 commit comments

Comments
 (0)