mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
dont crash sortedSetIncryBy on redis if no callback is supplied
This commit is contained in:
@@ -180,6 +180,7 @@ module.exports = function (redisClient, module) {
|
||||
};
|
||||
|
||||
module.sortedSetIncrBy = function (key, increment, value, callback) {
|
||||
callback = callback || helpers.noop;
|
||||
redisClient.zincrby(key, increment, value, function (err, newValue) {
|
||||
callback(err, !err ? parseFloat(newValue) : undefined);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user