diff --git a/views/user/search.js b/views/user/search.js index 70239fd..6ef9c6f 100644 --- a/views/user/search.js +++ b/views/user/search.js @@ -78,7 +78,7 @@ module.exports = function(server) { // Return a single object. (lookup_email ? user.getUserFromEmail : user.getUserFromID)(client, lookup, function(err, obj) { if (err || !obj) { - res.json(400, {error: err || lookup_email ? 'bad_email' : 'bad_id'}); + res.json(400, {error: err || (lookup_email ? 'bad_email' : 'bad_id')}); done(); return; }