diff options
Diffstat (limited to 'src/components/user_search/user_search.js')
| -rw-r--r-- | src/components/user_search/user_search.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/components/user_search/user_search.js b/src/components/user_search/user_search.js index 62dafdf1..5c29d8f2 100644 --- a/src/components/user_search/user_search.js +++ b/src/components/user_search/user_search.js @@ -35,15 +35,13 @@ const userSearch = { }, search (query) { if (!query) { - this.users = [] return } this.loading = true + this.userIds = [] this.$store.dispatch('searchUsers', query) - .then((res) => { - this.loading = false - this.userIds = map(res, 'id') - }) + .then((res) => { this.userIds = map(res, 'id') }) + .finally(() => { this.loading = false }) } } } |
