diff --git a/app/invites/server/functions/useInviteToken.js b/app/invites/server/functions/useInviteToken.js index 3a682839d6c63..9740b04b91fca 100644 --- a/app/invites/server/functions/useInviteToken.js +++ b/app/invites/server/functions/useInviteToken.js @@ -19,7 +19,7 @@ export const useInviteToken = (userId, token) => { Users.updateInviteToken(user._id, token); const subscription = Subscriptions.findOneByRoomIdAndUserId(room._id, user._id, { fields: { _id: 1 } }); - const userInRoom = subscription != null; + const userInRoom = !!subscription; if (!userInRoom) { Invites.increaseUsageById(inviteData._id); }