-
Notifications
You must be signed in to change notification settings - Fork 186
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
TypeError: Cannot read property 'some' of undefined #414
Comments
Hey @AnnaCate, that sounds weird - Can you share the options you pass when creating the observer? The I'm not seeing in myself running Chrome 86 in a Codesandbox: https://codesandbox.io/s/useinview-ud2vo?fontsize=14&hidenavigation=1&theme=dark It might make sense to just add the fix implemented in #194 - just to be sure |
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
🎉 This issue has been resolved in version 8.30.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@thebuilder thank you for the quick resolution. FWIW this these are the options being passed:
|
That's really weird. The solution I made assumes it's defined, and reverts to 0 threshold otherwise. If you are seeing this with an actual threshold, it wouldn't work as expected. Might look into taking the value you supplied in the options. |
I'm seeing a
TypeError: Cannot read property 'some' of undefined
for users onChrome 86
andSamsung Internet 5.2
, so far only for users on aSM-J727T
device.The error seems to be originating from:
react-intersection-observer/src/observers.ts
Lines 58 to 62 in 9312d1d
I'm already employing the
'intersection-observer'
polyfill.A similar issue was raised in #192 and resolved in #194, but it seems that the code has since changed.
The text was updated successfully, but these errors were encountered: