File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ import React, {
2
2
useState ,
3
3
useContext ,
4
4
useEffect ,
5
- createRef
5
+ createRef ,
6
+ isValidElement
6
7
} from 'react'
7
8
import PropTypes from 'prop-types'
8
9
import classNames from 'classnames'
@@ -100,7 +101,7 @@ const CSidebarNavDropdown = props => {
100
101
ref = { ref }
101
102
>
102
103
< a className = "c-sidebar-nav-dropdown-toggle" onClick = { toggle } >
103
- { icon && < CIcon { ...iconProps ( icon ) } /> }
104
+ { icon && ( isValidElement ( icon ) ? icon : < CIcon { ...iconProps ( icon ) } /> ) }
104
105
{ fontIcon && < i className = { iconClasses } /> }
105
106
{ name }
106
107
</ a >
@@ -121,7 +122,6 @@ CSidebarNavDropdown.propTypes = {
121
122
fontIcon : PropTypes . string ,
122
123
show : PropTypes . bool ,
123
124
route : PropTypes . string
124
- } ;
125
-
125
+ }
126
126
127
127
export default CSidebarNavDropdown
You can’t perform that action at this time.
0 commit comments