Skip to content

Node.js based forum software built for the modern web

dont crash if there is nothing to write

Baris Usakli51792da430fe
diff --git a/src/database/redis/hash.js b/src/database/redis/hash.js
index 3055143375..482012fe13 100644
--- a/src/database/redis/hash.js
+++ b/src/database/redis/hash.js
@@ -19,6 +19,9 @@ module.exports = function (redisClient, module) {
}
});
+ if (!Object.keys(data).length) {
+ return callback();
+ }
redisClient.hmset(key, data, function (err) {
callback(err);
});