diff --git a/lib/db/json.js b/lib/db/json.js index 5ff3d50a951065fbf3da66843aaa376e76ba8a41..0998f88032b459980ecdd02449ee53590b53c560 100644 --- a/lib/db/json.js +++ b/lib/db/json.js @@ -298,7 +298,7 @@ exports.completeAddEmail = function(secret, cb) { function addIt() { addEmailToAccount(o.existing_user, o.email, 'secondary', function(e) { var hash = o.passwd; - if(e || hash === null) return cb(e, o.email, o.existing_user); + if(e || typeof hash !== 'string') return cb(e, o.email, o.existing_user); // a hash was specified, update the password for the user exports.emailToUID(o.email, function(err, uid) {