don't error out if reward not filled

v1.18.x
psychobunny 10 years ago
parent 09086f7d30
commit 8373f7359e

@ -32,7 +32,11 @@ var defaults = {
rewards.save = function(data, callback) {
function save(data, next) {
var rewards = data.rewards || {};
if (!Object.keys(data.rewards).length) {
return next();
}
var rewards = data.rewards;
delete data.rewards;
async.parallel([

Loading…
Cancel
Save