Skip to content

Commit c73fd13

Browse files
committedMay 9, 2019
fix(sirv): regression with --single in dev mode
1 parent aff045d commit c73fd13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎packages/sirv/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@ module.exports = function (dir, opts={}) {
8484
stats = fs.statSync(file);
8585
if (stats.isDirectory()) continue;
8686
setHeaders(res, uri, stats);
87-
send(req, res, file, stats, {
87+
return send(req, res, file, stats, {
8888
'Content-Type': mime.getType(file),
8989
'Last-Modified': stats.mtime.toUTCString(),
9090
'Content-Length': stats.size,
9191
});
9292
}
93+
return next ? next() : isNotFound(req, res);
9394
}
9495
}
9596

0 commit comments

Comments
 (0)