fix role membership 'lengh' of undefined error
@@ -71,6 +71,8 @@ define(['angular', 'feed-mgr/module-name','constants/AccessConstants'], function
_.each(entity.roleMemberships,function(roleMembership){
var users = [];
var groups = [];
+ var update = false;
+ if(roleMembership.members != null && roleMembership.members != undefined) {
//if the members is empty for the entity we should update as the user cleared out memberships, otherwise we should update only if the member has a 'type' attr
var update = roleMembership.members.length == 0;
_.each(roleMembership.members, function (member) {
@@ -84,6 +86,7 @@ define(['angular', 'feed-mgr/module-name','constants/AccessConstants'], function
update = true;
}
});
+ }
if(update) {
roleMembership.users = users;
roleMembership.groups = groups;
