Skip to content

fix(intersection obs): handled edge case where component not visible #115

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

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

crisboarna
Copy link
Contributor

Fixes #114

Description
Adds sanity check similar to what componentDidMount does at line 42 in src/components/PlaceholderWithoutTracking.jsx to avoid edge case which results in

Uncaught TypeError: IntersectionObserver.unobserve: Argument 1 is not an object.

to occur.

@Aljullu

Copy link
Owner

@Aljullu Aljullu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing this fix, @crisboarna!

@Aljullu Aljullu merged commit d6ac7c7 into Aljullu:master Nov 7, 2022
@Aljullu
Copy link
Owner

Aljullu commented Nov 7, 2022

This has been released as part of 1.5.6. Please ping me if you find any issues.

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

Successfully merging this pull request may close these issues.

IntersectionObserver.unobserve: Argument 1 is not an object.
2 participants