Skip to content

Commit 45b73c6

Browse files
committed
fix next() caller; don’t send argument
1 parent 4a558e6 commit 45b73c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/sirv/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module.exports = function (dir, opts={}) {
6262
return function (req, res, next) {
6363
let pathname = req.path || req.pathname || parseurl(req).pathname;
6464
let data = find(pathname, extensions);
65-
if (!data) return (next || notFound)(res);
65+
if (!data) return next ? next() : notFound(res);
6666

6767
res.writeHead(200, data.headers);
6868
setHeaders(res, pathname, data.stats);

0 commit comments

Comments
 (0)