mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
challenges: pass down if user is member of group (group._isMember) for
performance. some bug fixes
This commit is contained in:
@@ -18,7 +18,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
||||
|
||||
// indexOf helper
|
||||
$scope.indexOf = function(haystack, needle){
|
||||
return ~haystack.indexOf(needle);
|
||||
return haystack && ~haystack.indexOf(needle);
|
||||
}
|
||||
|
||||
$scope.safeApply = function(fn) {
|
||||
|
||||
Reference in New Issue
Block a user