check sortBy

v1.18.x
Baris Usakli 8 years ago
parent f6ba79287b
commit bcf2156028

@ -182,7 +182,7 @@ function getMatchedPosts(pids, data, callback) {
async.parallel({
teasers: function (next) {
if (data.sortBy.startsWith('teaser')) {
if (data.sortBy && data.sortBy.startsWith('teaser')) {
var teaserKeys = topicsData.map(function (topic) {
return 'post:' + topic.teaserPid;
});

Loading…
Cancel
Save