mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
refactor isMemberOfGroup and tests
This commit is contained in:
@@ -20,7 +20,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
// If the group is a guild, just check for an intersection with the
|
||||
// current user's guilds, rather than checking the members of the group.
|
||||
if(group.type === 'guild') {
|
||||
return _.detect(Groups.myGuilds(), function(g) { return g._id === group._id }) ? true : false;
|
||||
return _.detect(Groups.myGuilds(), function(g) { return g._id === group._id });
|
||||
}
|
||||
|
||||
if (!group.members) return false;
|
||||
|
||||
Reference in New Issue
Block a user