Fetch all users in list before displaying

This commit is contained in:
Sol Fisher Romanoff 2022-06-16 13:38:24 +03:00
parent ab7001ed20
commit 9217ca8476
Signed by untrusted user who does not match committer: nbsp
GPG Key ID: 9D3F2B64F2341B62
1 changed files with 3 additions and 4 deletions

View File

@ -40,11 +40,10 @@ const ListNew = {
return this.userIds.map(userId => this.findUser(userId))
},
selectedUsers () {
const users = this.selectedUserIds.map(userId => this.findUser(userId))
if (users.includes(undefined)) {
return []
for (let i = 0; i < this.selectedUserIds.length; i++) {
this.$store.dispatch('fetchUserIfMissing', this.selectedUserIds[i])
}
return users
return this.selectedUserIds.map(userId => this.findUser(userId))
},
availableUsers () {
if (this.query.length !== 0) {