mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 12:16:53 +02:00
Abort scroll updates when already unmounted
This checks whether we're unmounted before updating scroll state, as we use async functions and timeouts in this area. Fixes https://github.com/vector-im/riot-web/issues/11150
This commit is contained in:
parent
5333201823
commit
3a428efb60
@ -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…
x
Reference in New Issue
Block a user