Skip to content

Commit

Permalink
Fixing an unhandled error bubbling (it's irrelevant for normal usage)
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Dec 20, 2017
1 parent 484f10d commit c4ecfab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion lib/woodland.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ class Woodland {
}

if (req.file === void 0 || empty) {
res.respond(output);
try {
res.respond(output);
} catch (e) {
void 0;
}

res.end(empty === false ? body : void 0);
} else {
res.respondWithFile(req.file.path, output);
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "woodland",
"version": "4.2.2",
"version": "4.2.3",
"description": "Lightweight HTTP/HTTPS/HTTP2 router with automatic `Allow` & `CORS` headers",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit c4ecfab

Please sign in to comment.