Skip to content

Commit d6ac7c7

Browse files
authored
fix(intersection obs): handled edge case where component not visible (#115)
1 parent 470e219 commit d6ac7c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/PlaceholderWithoutTracking.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class PlaceholderWithoutTracking extends React.Component {
5151
}
5252

5353
componentWillUnmount() {
54-
if (this.observer) {
54+
if (this.observer && this.placeholder) {
5555
this.observer.unobserve(this.placeholder);
5656
}
5757
}

0 commit comments

Comments
 (0)