unmounted check in TimelinePanel

pull/21833/head
Richard van der Hoff 2016-02-29 14:09:42 +00:00
parent db1e1c7df0
commit 559f60d43e
1 changed files with 2 additions and 0 deletions

View File

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