fix reward claimable check

v1.18.x
Barış Soner Uşaklı 8 years ago
parent fb45b498a2
commit 5c51a91e85

@ -74,8 +74,7 @@ function filterCompletedRewards(uid, rewards, callback) {
}
var claimable = parseInt(reward.claimable, 10);
return claimable === 0 || (userRewards[reward.id] < reward.claimable);
return claimable === 0 || (!userRewards[reward.id] || userRewards[reward.id] < reward.claimable);
});
next(null, rewards);

@ -15,7 +15,7 @@ module.exports = function (Topics) {
},
function (topics, next) {
sortTiedTopicsByViews(topics, next);
}
},
], callback);
return;
}

Loading…
Cancel
Save