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
Bruno Windels 2019-07-02 17:29:37 +02:00
parent 357ad3d50c
commit 14caed62d0
1 changed files with 3 additions and 0 deletions

View File

@ -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();
},