Fix undefined error in the notFound() handler

This commit is contained in:
Aron Carroll 2012-07-24 08:41:34 +01:00
parent dd59494e65
commit 9f64efb651

View File

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