mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
defend against undefined property
This commit is contained in:
parent
492853f284
commit
40cb7e4590
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ define [
|
|||
return addNextMember()
|
||||
|
||||
# NOTE: groups aren't really a thing in ShareLaTeX, partially inherited from DJ
|
||||
if member.display in currentInviteEmails and inviteId = _.find($scope.project.invites, (invite) -> invite.email == member.display)?._id
|
||||
if member.display in currentInviteEmails and inviteId = _.find(($scope.project.invites || []), (invite) -> invite.email == member.display)?._id
|
||||
request = projectInvites.resendInvite(inviteId)
|
||||
else if member.type == "user"
|
||||
request = projectInvites.sendInvite(member.email, $scope.inputs.privileges)
|
||||
|
|
Loading…
Reference in a new issue