remove unnecessary checks

This commit is contained in:
Barış Soner Uşaklı
2017-05-27 00:30:07 -04:00
parent 6a742ead38
commit f1b8492164
12 changed files with 29 additions and 40 deletions

View File

@@ -19,7 +19,7 @@ module.exports = function (Categories) {
topics.getTopicsByTids(tids, data.uid, next);
},
function (topics, next) {
if (!Array.isArray(topics) || !topics.length) {
if (!topics.length) {
return next(null, { topics: [], uid: data.uid });
}