Appease the linter

pull/21833/head
Travis Ralston 2020-01-08 20:53:20 -07:00
parent 79ab69353c
commit ab5d82b5ac
1 changed files with 2 additions and 2 deletions

View File

@ -541,10 +541,10 @@ export default class DMInviteDialog extends React.PureComponent {
const hasMixins = this.state.serverResultsMixin || this.state.threepidResultsMixin;
if (this.state.filterText && hasMixins && kind === 'suggestions') {
// We don't want to duplicate members though, so just exclude anyone we've already seen.
function notAlreadyExists(u: Member): boolean {
const notAlreadyExists = (u: Member): boolean => {
return !sourceMembers.some(m => m.userId === u.userId)
&& !additionalMembers.some(m => m.userId === u.userId);
}
};
const uniqueServerResults = this.state.serverResultsMixin.filter(notAlreadyExists);
additionalMembers = additionalMembers.concat(...uniqueServerResults);