mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix: allow quotes in messages (#3525)
This commit is contained in:
parent
7c852029aa
commit
22a53464a7
@ -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()
|
||||
}
|
||||
|
||||
|
@ -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 %>`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user