mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
check length
This commit is contained in:
@@ -12,6 +12,10 @@ module.exports = function(redisClient, module) {
|
||||
};
|
||||
|
||||
function sortedSetAddMulti(key, scores, values, callback) {
|
||||
if (!score.length || !values.length) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
if (scores.length !== values.length) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user