From 658b4aa2a4788381a0e2bb17bdb866e2876604b9 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Mon, 3 Jun 2013 16:09:37 -0400 Subject: [PATCH] groups: bug fix to can't invite new user for users who haven't already been migrated --- src/app/groups.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/groups.coffee b/src/app/groups.coffee index 2ff6617802..222579f268 100644 --- a/src/app/groups.coffee +++ b/src/app/groups.coffee @@ -57,13 +57,13 @@ module.exports.app = (appExports, model, app) -> switch type when 'guild' - if _.find(profile.invitations.guilds, {id:gid}) + if profile.invitations?.guilds and _.find(profile.invitations.guilds, {id:gid}) return groupError("User already invited to that group") else if uid in group.members return groupError("User already in that group") else invite() when 'party' - if profile.invitations.party + if profile.invitations?.party return groupError("User already pending invitation.") else if _.find(groups, {type:'party'}) return groupError("User already in a party.")