Do not fetch user profile when deleting multiple accounts

This commit is contained in:
Angelina Filippova 2020-07-17 13:47:50 +03:00
parent f8dbcb80ab
commit 434f8ad2dd

View file

@ -197,7 +197,9 @@ const users = {
const updatedUsers = state.fetchedUsers.filter(user => !deletedUsersIds.includes(user.id))
commit('SET_USERS', updatedUsers)
dispatch('FetchUserProfile', { userId: _userId, godmode: false })
if (_userId) {
dispatch('FetchUserProfile', { userId: _userId, godmode: false })
}
dispatch('SuccessMessage')
},
async FetchUsers({ commit, dispatch, getters, state }, { page }) {