We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c84573 commit c463ea5Copy full SHA for c463ea5
src/template/CSidebar.js
@@ -95,8 +95,11 @@ const CSidebar = props => {
95
}
96
97
const closeSidebar = () => {
98
- onShowChange && onShowChange(overlaid ? false : 'responsive')
99
- setIsOpen(overlaid ? false : 'responsive')
+ if (typeof onShowChange === 'function') {
+ onShowChange(overlaid ? false : 'responsive')
100
+ } else {
101
+ setIsOpen(overlaid ? false : 'responsive')
102
+ }
103
104
105
const isOnMobile = () => {
0 commit comments