From 9731e8ccc6f031e72f43ba3ccb82e4cb849116a9 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 29 Jul 2015 11:41:41 -0700 Subject: [PATCH] fix return callbacks --- common/models/user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/models/user.js b/common/models/user.js index 0ddb4cd0276..dbb75430406 100644 --- a/common/models/user.js +++ b/common/models/user.js @@ -144,17 +144,17 @@ module.exports = function(User) { } User.findOne({ where: { username } }, (err, user) => { if (err) { - cb(err); + return cb(err); } if (!user || user.username !== username) { - cb(new Error('FCC: no user found for %s', username)); + return cb(new Error('FCC: no user found for %s', username)); } const aboutUser = { username: user.username, bio: user.bio, github: user.githubProfile }; - cb(null, aboutUser); + return cb(null, aboutUser); }); };