avoid referencing null on user leave

This commit is contained in:
Anton Georgiev 2018-06-19 15:38:53 +00:00
parent c8649b1e74
commit 634b7b34c7

View File

@ -23,7 +23,7 @@ export default function userLeaving(credentials, userId, connectionId) {
const User = Users.findOne(selector);
if (!User) {
throw new Meteor.Error('user-not-found', `Could not find ${userId} in ${meetingId}: cannot complete userLeaving`);
return Logger.info(`Skipping userLeaving. Could not find ${userId} in ${meetingId}`);
}
// If the current user connection is not the same that triggered the leave we skip