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