Defend against undefined invites and members

This commit is contained in:
Shane Kilkelly 2016-08-15 14:56:02 +01:00
parent 158afbb157
commit 492853f284

View file

@ -43,10 +43,10 @@ define [
contact.display = contact.name
getCurrentMemberEmails = () ->
$scope.project.members.map (u) -> u.email
($scope.project.members || []).map (u) -> u.email
getCurrentInviteEmails = () ->
$scope.project.invites.map (u) -> u.email
($scope.project.invites || []).map (u) -> u.email
$scope.filterAutocompleteUsers = ($query) ->
currentMemberEmails = getCurrentMemberEmails()