From 4c6644b3d63b4c5e00993e52ad64f245bdc006c0 Mon Sep 17 00:00:00 2001 From: Jonathan Cremin Date: Sun, 7 Dec 2014 16:15:50 +0000 Subject: [PATCH] Handle erroneous searches --- routes/search.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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('/'); }