diff --git a/controllers/story.js b/controllers/story.js index a828f70d05..46378dfcb4 100755 --- a/controllers/story.js +++ b/controllers/story.js @@ -182,7 +182,7 @@ exports.getStories = function(req, res, next) { } database.collection('stories').find({ '$text': { - '$search': req.body.data.searchValue + '$search': req.body.data ? req.body.data.searchValue : "" } }, { headline: 1,