Skip to content

Commit 24f5d39

Browse files
author
Viktor_the_great
committed
ref is defined (react-bootstrap#746)
1 parent 296949b commit 24f5d39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useRootClose.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function useRootClose(
7171
useEffect(() => {
7272
if (disabled || ref == null) return undefined;
7373

74-
const doc = ownerDocument(ref && ref.current);
74+
const doc = ownerDocument(ref.current);
7575

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

0 commit comments

Comments
 (0)