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 contact.display = contact.name
getCurrentMemberEmails = () -> getCurrentMemberEmails = () ->
$scope.project.members.map (u) -> u.email ($scope.project.members || []).map (u) -> u.email
getCurrentInviteEmails = () -> getCurrentInviteEmails = () ->
$scope.project.invites.map (u) -> u.email ($scope.project.invites || []).map (u) -> u.email
$scope.filterAutocompleteUsers = ($query) -> $scope.filterAutocompleteUsers = ($query) ->
currentMemberEmails = getCurrentMemberEmails() currentMemberEmails = getCurrentMemberEmails()