Explorar el Código

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

master
mortie hace 7 años
padre
commit
1520bc0866
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4
    1
      js/slideshow.js

+ 4
- 1
js/slideshow.js Ver fichero

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


Cargando…
Cancelar
Guardar