diff --git a/routes/search.js b/routes/search.js index dbedcd7..8e45776 100644 --- a/routes/search.js +++ b/routes/search.js @@ -44,13 +44,12 @@ module.exports = function(req, res, next) { req.flash('search-error', 'No match found for this link'); res.redirect('/'); } - }); break; } } } - if (!searching) { + if (url.host && !searching) { req.flash('search-error', 'No match found for this link'); res.redirect('/'); }