Browse Source

no longer spams the console with errors when non-existant files are edited

master
mortie 7 years ago
parent
commit
1520bc0866
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      js/slideshow.js

+ 4
- 1
js/slideshow.js View File

@@ -32,7 +32,10 @@ function sendFile(path, res) {
});

fs.createReadStream(path)
.on("error", err => error(err, res))
.on("error", err => {
res.writeHead(404);
res.end(err.toString());
})
.pipe(res);
}


Loading…
Cancel
Save