fix: allow quotes in messages (#3525)

This commit is contained in:
Clark Du 2018-07-12 21:45:14 +01:00 committed by GitHub
parent 7c852029aa
commit 22a53464a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -243,7 +243,7 @@ async function render (to, from, next) {
await callMiddleware.call(this, Components, app.context, layout)
if (nextCalled) return
// Show error page
app.context.error({ statusCode: 404, message: '<%= messages.error_404 %>' })
app.context.error({ statusCode: 404, message: `<%= messages.error_404 %>` })
return next()
}
@ -285,7 +285,7 @@ async function render (to, from, next) {
})
// ...If .validate() returned false
if (!isValid) {
this.error({ statusCode: 404, message: '<%= messages.error_404 %>' })
this.error({ statusCode: 404, message: `<%= messages.error_404 %>` })
return next()
}

View File

@ -38,7 +38,7 @@ export default {
return (this.error && this.error.statusCode) || 500
},
message () {
return this.error.message || '<%= messages.client_error %>'
return this.error.message || `<%= messages.client_error %>`
}
}
}

View File

@ -75,7 +75,7 @@ export default async ssrContext => {
return _app
}
const render404Page = () => {
app.context.error({ statusCode: 404, path: ssrContext.url, message: '<%= messages.error_404 %>' })
app.context.error({ statusCode: 404, path: ssrContext.url, message: `<%= messages.error_404 %>` })
return renderErrorPage()
}