mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
🐛 HTML page error: correct templateData (#9144)
no issue - `this.statusCode` was always undefined - see HTML error handler - it's hard to add a test for this case - manual test only
This commit is contained in:
parent
9f9d8b2fec
commit
8de691d575
@ -84,6 +84,7 @@ function getAjaxHelper(clientId, clientSecret) {
|
||||
|
||||
module.exports = function ghost_head(options) {
|
||||
debug('begin');
|
||||
|
||||
// if server error page do nothing
|
||||
if (this.statusCode >= 500) {
|
||||
return;
|
||||
|
@ -81,11 +81,13 @@ _private.HTMLErrorRenderer = function HTMLErrorRender(err, req, res, next) {
|
||||
}
|
||||
|
||||
var templateData = {
|
||||
message: err.message,
|
||||
code: err.statusCode,
|
||||
errorDetails: err.errorDetails || []
|
||||
},
|
||||
template = templates.error(err.statusCode);
|
||||
message: err.message,
|
||||
// @deprecated
|
||||
code: err.statusCode,
|
||||
statusCode: err.statusCode,
|
||||
errorDetails: err.errorDetails || []
|
||||
},
|
||||
template = templates.error(err.statusCode);
|
||||
|
||||
// It can be that something went wrong with the theme or otherwise loading handlebars
|
||||
// This ensures that no matter what res.render will work here
|
||||
|
Loading…
Reference in New Issue
Block a user