From 977cd98a797b50e3fa9abf22509a803be5e81734 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 1 Oct 2014 00:29:47 -0400 Subject: [PATCH] dont crash if user doesn't have email --- src/user/profile.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/user/profile.js b/src/user/profile.js index e8d42da6d5..8b46f53994 100644 --- a/src/user/profile.js +++ b/src/user/profile.js @@ -123,6 +123,8 @@ module.exports = function(User) { return callback(err); } + userData.email = userData.email || ''; + if (userData.email === newEmail) { return callback(); }