1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

unmounted check in TimelinePanel

This commit is contained in:
Richard van der Hoff
2016-02-29 14:09:42 +00:00
parent db1e1c7df0
commit 559f60d43e

View File

@ -174,6 +174,8 @@ var TimelinePanel = React.createClass({
this.setState({[statekey]: true}); this.setState({[statekey]: true});
return this._timelineWindow.paginate(dir, PAGINATE_SIZE).then((r) => { return this._timelineWindow.paginate(dir, PAGINATE_SIZE).then((r) => {
if (this.unmounted) { return; }
debuglog("TimelinePanel: paginate complete backwards:"+backwards+"; success:"+r); debuglog("TimelinePanel: paginate complete backwards:"+backwards+"; success:"+r);
this.setState({[statekey]: false}); this.setState({[statekey]: false});
this._onTimelineUpdated(r); this._onTimelineUpdated(r);