Skip to content

Commit

Permalink
Make more concise
Browse files Browse the repository at this point in the history
  • Loading branch information
NMinhNguyen committed Apr 5, 2020
1 parent 053a348 commit a9a2da4
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ function ClickAwayListener(props) {
nodeRef.current.contains(event.target);
}

insideDOM = insideDOM || (!disableReactTree && insideReactTree);

if (!insideDOM) {
if (!insideDOM && (disableReactTree || !insideReactTree)) {
onClickAway(event);
}
});
Expand Down

0 comments on commit a9a2da4

Please sign in to comment.