File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ import React, {
22 useState ,
33 useContext ,
44 useEffect ,
5- createRef
5+ createRef ,
6+ isValidElement
67} from 'react'
78import PropTypes from 'prop-types'
89import classNames from 'classnames'
@@ -100,7 +101,7 @@ const CSidebarNavDropdown = props => {
100101 ref = { ref }
101102 >
102103 < a className = "c-sidebar-nav-dropdown-toggle" onClick = { toggle } >
103- { icon && < CIcon { ...iconProps ( icon ) } /> }
104+ { icon && ( isValidElement ( icon ) ? icon : < CIcon { ...iconProps ( icon ) } /> ) }
104105 { fontIcon && < i className = { iconClasses } /> }
105106 { name }
106107 </ a >
@@ -121,7 +122,6 @@ CSidebarNavDropdown.propTypes = {
121122 fontIcon : PropTypes . string ,
122123 show : PropTypes . bool ,
123124 route : PropTypes . string
124- } ;
125-
125+ }
126126
127127export default CSidebarNavDropdown
You can’t perform that action at this time.
0 commit comments