Parcourir la source

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

master
mortie il y a 7 ans
Parent
révision
1520bc0866
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4
    1
      js/slideshow.js

+ 4
- 1
js/slideshow.js Voir le fichier

@@ -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);
}


Chargement…
Annuler
Enregistrer