return the correct promise type from action

This commit is contained in:
Shpuld Shpuldson 2020-06-18 13:00:09 +03:00
parent abbad84b00
commit fa7bcb74ce
1 changed files with 1 additions and 1 deletions

View File

@ -438,7 +438,7 @@ const users = {
searchUsers ({ rootState, commit }, { query }) {
// Don't fetch if this query was already done recently
if (rootState.users.recentQueries.includes(query)) {
return []
return Promise.resolve([])
}
return rootState.api.backendInteractor.searchUsers({ query })
.then((users) => {