We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a558e6 commit 45b73c6Copy full SHA for 45b73c6
packages/sirv/index.js
@@ -62,7 +62,7 @@ module.exports = function (dir, opts={}) {
62
return function (req, res, next) {
63
let pathname = req.path || req.pathname || parseurl(req).pathname;
64
let data = find(pathname, extensions);
65
- if (!data) return (next || notFound)(res);
+ if (!data) return next ? next() : notFound(res);
66
67
res.writeHead(200, data.headers);
68
setHeaders(res, pathname, data.stats);
0 commit comments