Skip to content

Commit a98823f

Browse files
fix: add null check for _container in SidebarMobile click handler
1 parent ce35aea commit a98823f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/SidebarMobile/SidebarMobile.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export default class SidebarMobile extends Component {
136136
*/
137137
_handleBodyClick = (event) => {
138138
const { isOpen, toggle } = this.props;
139-
if (isOpen && !this._container.contains(event.target)) {
139+
if (isOpen && this._container && !this._container.contains(event.target)) {
140140
toggle(false);
141141
}
142142
};

0 commit comments

Comments
 (0)