diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index d8a79c5cc..3018058b3 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -481,7 +481,7 @@ define([ checkUserGroups: function(username) { var groups = Common.Utils.UserInfoParser.getParsedGroups(username); - return this.currentUserGroups && groups && (_.intersection(this.currentUserGroups, groups).length>0); + return this.currentUserGroups && groups && (_.intersection(this.currentUserGroups, (groups.length>0) ? groups : [""]).length>0); }, getUserName: function(id){ diff --git a/apps/common/mobile/lib/controller/Collaboration.js b/apps/common/mobile/lib/controller/Collaboration.js index c0df47d38..7ae215ffb 100644 --- a/apps/common/mobile/lib/controller/Collaboration.js +++ b/apps/common/mobile/lib/controller/Collaboration.js @@ -700,7 +700,7 @@ define([ checkUserGroups: function(username) { var groups = Common.Utils.UserInfoParser.getParsedGroups(username); - return _currentUserGroups && groups && (_.intersection(_currentUserGroups, groups).length>0); + return _currentUserGroups && groups && (_.intersection(_currentUserGroups, (groups.length>0) ? groups : [""]).length>0); }, dateToLocaleTimeString: function (date) {