mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-28 09:52:16 +02:00
Appease the linter
This commit is contained in:
parent
79ab69353c
commit
ab5d82b5ac
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user