Skip to content

Commit 5fd72b0

Browse files
committed
fix: CSidebarNavItem: do not render icon if prop is undefined #133
1 parent d0dba67 commit 5fd72b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/template/CSidebarNavItem.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const CSidebarNavItem = props => {
4444
{...routerLinkProps}
4545
{...rest}
4646
>
47-
{ icon && isValidElement(icon) ? icon : <CIcon {...iconProps(icon)}/> }
47+
{ icon && (isValidElement(icon) ? icon : <CIcon {...iconProps(icon)}/>) }
4848
{ fontIcon && <i className={`c-sidebar-nav-icon ${fontIcon}`}/>}
4949
{name}
5050
{ badge && <CBadge {...{...badge, text: null}}>{badge.text}</CBadge>}

0 commit comments

Comments
 (0)