Add unmounted guard

pull/21833/head
lukebarnard 2017-12-13 10:42:11 +00:00
parent 42c1f3cfe2
commit a8b245d0cf
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +64,7 @@ const TagPanel = React.createClass({
Promise.all(orderedGroupTags.map( Promise.all(orderedGroupTags.map(
(groupId) => FlairStore.getGroupProfileCached(this.context.matrixClient, groupId), (groupId) => FlairStore.getGroupProfileCached(this.context.matrixClient, groupId),
)).then((orderedGroupTagProfiles) => { )).then((orderedGroupTagProfiles) => {
if (this.unmounted) return;
this.setState({orderedGroupTagProfiles}); this.setState({orderedGroupTagProfiles});
}); });
}); });