From 9e3c94edf4dfe64ff495dbdb2a7f52da5c40dd14 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 6 Dec 2016 14:59:10 +0000 Subject: [PATCH] Fix exception when clearing room dir search Needed more isMounted checks after promises return. --- src/components/structures/ScrollPanel.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index 31ac59c730..a9e16d364c 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -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);