summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-07-06 13:32:11 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-07-06 13:32:11 +0200
commit0dfc47c02df7d589c54fa8e840cd740e5460593d (patch)
tree3654f6237b9f6832fecb66ae0b55b74db1570a21
parent4df15bf573c1dd15bc838e742eefc2bc68740613 (diff)
downloadnextcloud-server-0dfc47c02df7d589c54fa8e840cd740e5460593d.tar.gz
nextcloud-server-0dfc47c02df7d589c54fa8e840cd740e5460593d.zip
Return correct user count when the group has none
-rw-r--r--settings/js/users/groups.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index 298879b503b..838950bd37e 100644
--- a/settings/js/users/groups.js
+++ b/settings/js/users/groups.js
@@ -36,7 +36,11 @@ GroupList = {
},
getUserCount: function ($groupLiElement) {
- return parseInt($groupLiElement.data('usercount'), 10);
+ var $userCount = parseInt($groupLiElement.data('usercount'), 10);
+ if (isNaN($userCount)) {
+ $userCount = 0;
+ }
+ return $userCount;
},
modEveryoneCount: function(diff) {