Handle erroneous searches

This commit is contained in:
Jonathan Cremin 2014-12-07 16:15:50 +00:00
parent 74f5b36b4b
commit 4c6644b3d6

View file

@ -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('/');
}