mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
if not term just use empty string
This commit is contained in:
@@ -740,11 +740,14 @@ var path = require('path'),
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/search/:term', function (req, res) {
|
||||
app.get('/search/:term?', function (req, res) {
|
||||
|
||||
if (!req.user && meta.config.allowGuestSearching !== '1') {
|
||||
return res.redirect('/403');
|
||||
}
|
||||
|
||||
if(!req.params.term) {
|
||||
req.params.term = '';
|
||||
}
|
||||
app.build_header({
|
||||
req: req,
|
||||
res: res
|
||||
|
||||
Reference in New Issue
Block a user