Browse Source

Do not manipulate userCount when it is equal to 0

Signed-off-by: Louis Chemineau <louis@chmn.me>
tags/v28.0.0beta1
Louis Chemineau 9 months ago
parent
commit
bd787e8593
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      apps/settings/src/store/users.js

+ 5
- 0
apps/settings/src/store/users.js View File

@@ -169,6 +169,11 @@ const mutations = {
},
// update active/disabled counts, groups counts
updateUserCounts(state, { user, actionType }) {
// 0 is a special value
if (state.userCount === 0) {
return
}

const disabledGroup = state.groups.find(group => group.id === 'disabled')
switch (actionType) {
case 'enable':

Loading…
Cancel
Save