From 9f64efb651226ea46129bdbc7348a5b94fe740b4 Mon Sep 17 00:00:00 2001 From: Aron Carroll Date: Tue, 24 Jul 2012 08:41:34 +0100 Subject: [PATCH] Fix undefined error in the notFound() handler --- lib/handlers/error.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/handlers/error.js b/lib/handlers/error.js index dd4040f6..2700cff9 100644 --- a/lib/handlers/error.js +++ b/lib/handlers/error.js @@ -36,10 +36,10 @@ module.exports = Observable.extend({ // Fall through handler for when no routes match. notFound: function (req, res, next) { + var error = new errors.NotFound('Page Does Not Exist'); if (req.accepts('html')) { - this.renderErrorPage(err, req, res); + this.renderErrorPage(error, req, res); } else { - var error = new errors.NotFound('Page Does Not Exist'); this.renderError(error, req, res); } },