mirror of https://github.com/vector-im/riot-web
make sure scrollpanel is mounted before checking scroll
have seen errors in this direction, so hope this will fix it, as this is invoked from any EventTile's onHeightChanged callback, which is often called after some async operation (by when the timeline can be unmounted already). doesn't hurt in any case.pull/21833/head
parent
357ad3d50c
commit
14caed62d0
|
@ -214,6 +214,9 @@ module.exports = React.createClass({
|
|||
// after an update to the contents of the panel, check that the scroll is
|
||||
// where it ought to be, and set off pagination requests if necessary.
|
||||
checkScroll: function() {
|
||||
if (this.unmounted) {
|
||||
return;
|
||||
}
|
||||
this._restoreSavedScrollState();
|
||||
this.checkFillState();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue