optimize suggested topics/search

This commit is contained in:
Barış Soner Uşaklı
2018-11-11 17:57:17 -05:00
parent 07f83c5078
commit 96e986a865
3 changed files with 46 additions and 37 deletions

View File

@@ -289,10 +289,7 @@ Topics.getMainPids = function (tids, callback) {
Topics.getTopicsFields(tids, ['mainPid'], next);
},
function (topicData, next) {
var mainPids = topicData.map(function (topic) {
return topic && topic.mainPid;
});
next(null, mainPids);
next(null, topicData.map(topic => topic && topic.mainPid));
},
], callback);
};