Skip to content

Commit

Permalink
clean up logic
Browse files Browse the repository at this point in the history
  • Loading branch information
scurker committed Sep 5, 2023
1 parent c3bec2a commit 0229e13
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/react/src/utils/useIntersectionRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ export default function useIntersectionRef<T extends HTMLElement>(
'IntersectionObserver' in globalThis &&
typeof IntersectionObserver === 'function'
) {
if (
!element &&
typeof element === 'object' &&
!(element as MutableRefObject<T>)?.current
) {
if (typeof element === 'undefined' || element === null) {
return;
}

Expand Down

0 comments on commit 0229e13

Please sign in to comment.