Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
always close
  • Loading branch information
mmahalwy committed Jan 18, 2017
commit 7e17d50077c29d52d14870479f9b7ffe950f5db0
5 changes: 2 additions & 3 deletions src/components/GlobalSidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class GlobalSidebar extends Component {
document.body.removeEventListener('click', this.onBodyClick.bind(this), true);
}

onBodyClick = (event) => {
onBodyClick = () => {
const { open, handleOpen } = this.props;

if (open && !this.container.contains(event.target)) {
if (open) {
return handleOpen(false);
}

Expand All @@ -48,7 +48,6 @@ class GlobalSidebar extends Component {

return (
<div
ref={(container) => { this.container = container; }}
className={`${styles.container} sidebar ${open && styles.open}`}
>
<Navbar static fluid>
Expand Down