Unobserve status on unmount (#4013)
This fixes a warning on status unmounting (e.g. deletion). This also resets IntersectionObserverWrapper on disconnect to avoid `unobserve()` calls which has bug in Edge.
This commit is contained in:
parent
34c8a46d7d
commit
9c03fd9cae
2 changed files with 13 additions and 0 deletions
|
@ -90,6 +90,10 @@ export default class Status extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
if (this.props.intersectionObserverWrapper) {
|
||||
this.props.intersectionObserverWrapper.unobserve(this.props.id, this.node);
|
||||
}
|
||||
|
||||
this.componentMounted = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue