mirror of
https://github.com/jsbin/jsbin.git
synced 2026-01-25 15:38:56 +00:00
Fix undefined error in the notFound() handler
This commit is contained in:
parent
dd59494e65
commit
9f64efb651
@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user