mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-05 10:45:37 +02:00
ESlint no-unneeded-ternary
and no-extend-native, no-sequences
This commit is contained in:
@@ -138,7 +138,7 @@ module.exports = function (db, module) {
|
||||
}
|
||||
|
||||
db.collection('objects').count(query, function (err, count) {
|
||||
callback(err, count ? count : 0);
|
||||
callback(err, count || 0);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -148,7 +148,7 @@ module.exports = function (db, module) {
|
||||
}
|
||||
db.collection('objects').count({ _key: key }, function (err, count) {
|
||||
count = parseInt(count, 10);
|
||||
callback(err, count ? count : 0);
|
||||
callback(err, count || 0);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user