Update Header.vue

This commit is contained in:
Troplo 2022-07-30 22:11:34 +10:00
parent 06039463c9
commit 7695949bd7

View file

@ -797,7 +797,6 @@ export default {
) )
this.settings.addMembers.dialog = false this.settings.addMembers.dialog = false
this.settings.addMembers.users = [] this.settings.addMembers.users = []
this.settings.addMembers.results = []
}) })
.catch((e) => { .catch((e) => {
AjaxErrorHandler(this.$store)(e) AjaxErrorHandler(this.$store)(e)
@ -931,14 +930,12 @@ export default {
this.axios this.axios
.get("/api/v1/communications/search?query=") .get("/api/v1/communications/search?query=")
.then((res) => { .then((res) => {
if (this.settings.item) {
this.settings.addMembers.results = res.data this.settings.addMembers.results = res.data
this.settings.addMembers.results = this.settings.addMembers.results =
this.settings.addMembers.results.filter( this.settings.addMembers.results.filter(
(user) => (user) =>
!this.settings.item.chat.users.find((u) => u.id === user.id) !this.settings.item.chat.users.find((u) => u.id === user.id)
) )
}
}) })
.catch(() => {}) .catch(() => {})
} }