Fix exception when clearing room dir search

Needed more isMounted checks after promises return.
pull/21833/head
David Baker 2016-12-06 14:59:10 +00:00
parent c0b931a837
commit 9e3c94edf4
1 changed files with 3 additions and 0 deletions

View File

@ -402,6 +402,9 @@ module.exports = React.createClass({
q.finally(fillPromise, () => {
this._pendingFillRequests[dir] = false;
}).then((hasMoreResults) => {
if (this.unmounted) {
return;
}
// Unpaginate once filling is complete
this._checkUnfillState(!backwards);