mirror of https://github.com/vector-im/riot-web
Merge pull request #3557 from matrix-org/jryans/scroll-unmount-guard
Abort scroll updates when already unmountedpull/21833/head
commit
a3dbf881e8
|
@ -677,6 +677,11 @@ module.exports = createReactClass({
|
|||
debuglog("updateHeight getting straight to business, no scrolling going on.");
|
||||
}
|
||||
|
||||
// We might have unmounted since the timer finished, so abort if so.
|
||||
if (this.unmounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
const sn = this._getScrollNode();
|
||||
const itemlist = this.refs.itemlist;
|
||||
const contentHeight = this._getMessagesHeight();
|
||||
|
|
Loading…
Reference in New Issue