forked from AkkomaGang/akkoma-fe
Fetch all users in list before displaying
This commit is contained in:
parent
ab7001ed20
commit
9217ca8476
1 changed files with 3 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue