From 65e2c4cd2021459cb35db4c96ea52c06c709d72b Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 29 Jun 2015 16:58:34 -0400 Subject: [PATCH] missing error --- src/rewards/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rewards/index.js b/src/rewards/index.js index 763a69afa8..c693b550fc 100644 --- a/src/rewards/index.js +++ b/src/rewards/index.js @@ -69,6 +69,10 @@ function getIDsByCondition(condition, callback) { function filterCompletedRewards(uid, rewards, callback) { db.getSortedSetRangeByScoreWithScores('uid:' + uid + ':rewards', 0, -1, 1, Infinity, function(err, data) { + if (err) { + return callback(err); + } + var userRewards = {}; data.forEach(function(obj) {