Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure thresholds is defined #415

Merged
merged 1 commit into from
Nov 11, 2020
Merged

Conversation

thebuilder
Copy link
Owner

Sometimes the thresholds value on the IntersectionObserver instance could be undefined. Add a fallback to a default value in the cases where the browser doesn't set it.

This fixes #414

@vercel
Copy link

vercel bot commented Nov 11, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/the-builder/react-intersection-observer/e1m9qurql
✅ Preview: https://react-intersection-observer-git-fix-ensure-thresholds.the-builder.vercel.app

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 066387c:

Sandbox Source
useInView Configuration
InView render props Configuration
InView plain children Configuration

@thebuilder thebuilder merged commit 76405d7 into master Nov 11, 2020
@thebuilder thebuilder deleted the fix/ensure-thresholds branch November 11, 2020 11:05
@thebuilder
Copy link
Owner Author

🎉 This PR is included in version 8.30.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Cannot read property 'some' of undefined
1 participant