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

@@ -111,7 +111,7 @@ function filterAndSort(pids, data, callback) {
getMatchedPosts(pids, data, next);
},
function (posts, next) {
if (!Array.isArray(posts) || !posts.length) {
if (!posts.length) {
return callback(null, pids);
}
posts = posts.filter(Boolean);