Skip to content

Commit

Permalink
ref is defined (react-bootstrap#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor_the_great committed Dec 10, 2019
1 parent 296949b commit 24f5d39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useRootClose.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function useRootClose(
useEffect(() => {
if (disabled || ref == null) return undefined;

const doc = ownerDocument(ref && ref.current);
const doc = ownerDocument(ref.current);

// Use capture for this listener so it fires before React's listener, to
// avoid false positives in the contains() check below if the target DOM
Expand Down

0 comments on commit 24f5d39

Please sign in to comment.