mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-04-14 16:38:08 +02:00
dont crash if there is nothing to write
This commit is contained in:
@@ -19,6 +19,9 @@ module.exports = function (redisClient, module) {
|
||||
}
|
||||
});
|
||||
|
||||
if (!Object.keys(data).length) {
|
||||
return callback();
|
||||
}
|
||||
redisClient.hmset(key, data, function (err) {
|
||||
callback(err);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user