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.
This commit is contained in:
Bruno Windels 2019-07-02 17:29:37 +02:00
parent 357ad3d50c
commit 14caed62d0

View file

@ -214,6 +214,9 @@ module.exports = React.createClass({
// after an update to the contents of the panel, check that the scroll is // 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. // where it ought to be, and set off pagination requests if necessary.
checkScroll: function() { checkScroll: function() {
if (this.unmounted) {
return;
}
this._restoreSavedScrollState(); this._restoreSavedScrollState();
this.checkFillState(); this.checkFillState();
}, },