From c0c7b639edae654809705384761a8252c9b304d3 Mon Sep 17 00:00:00 2001 From: Esther Date: Mon, 22 Jun 2020 17:57:35 +0100 Subject: [PATCH] Fixed a silly mistake --- app.js | 2 +- public/javascript/error.js | 4 ---- views/error.pug | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 public/javascript/error.js diff --git a/app.js b/app.js index a2320cc..f4a9faa 100644 --- a/app.js +++ b/app.js @@ -42,7 +42,7 @@ app.use(function(err, req, res, next) { // render the error page res.status(err.status || 500); - res.render('error'); + res.render('error', { title: 'Error', description: "Error" }); }); module.exports = app; diff --git a/public/javascript/error.js b/public/javascript/error.js deleted file mode 100644 index 85e03ef..0000000 --- a/public/javascript/error.js +++ /dev/null @@ -1,4 +0,0 @@ -$(document).ready(function () { - var eCode = $("#error-code h2").text(); - $(document).attr("title", "ESTR // " + eCode); -}); \ No newline at end of file diff --git a/views/error.pug b/views/error.pug index 10ad72f..72f2819 100644 --- a/views/error.pug +++ b/views/error.pug @@ -26,7 +26,3 @@ block content h1= message #error-code h2= error.status - //pre #{error.stack} - -block scripts - script(src="/javascript/error.js") \ No newline at end of file