mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-01 02:07:50 +02:00
one more check
This commit is contained in:
@@ -77,8 +77,12 @@ module.exports = function (User) {
|
||||
}
|
||||
|
||||
if (!Array.isArray(set) || !set.length || !set.every((item) => {
|
||||
if (!item) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const check = item.hasOwnProperty(property) ? item[property] : item;
|
||||
return item && ['number', 'string'].includes(typeof check);
|
||||
return ['number', 'string'].includes(typeof check);
|
||||
})) {
|
||||
return callback(null, set);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user