Skip to content

Commit

Permalink
chore: support undefined in hook
Browse files Browse the repository at this point in the history
  • Loading branch information
thebuilder committed Dec 14, 2024
1 parent bd8de3a commit 41703d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useInView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function useInView({
);

const entryTarget = state.entry?.target;
const previousEntryTarget = React.useRef<Element>(null);
const previousEntryTarget = React.useRef<Element | undefined>(undefined);
if (
!ref &&
entryTarget &&
Expand Down

0 comments on commit 41703d3

Please sign in to comment.