mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
add title for spa error handler
This commit is contained in:
parent
769c1100b6
commit
e70d0ba7d0
@ -31,6 +31,8 @@ NUXT.components = window.__COMPONENTS__ || null
|
||||
// Setup global Vue error handler
|
||||
const defaultErrorHandler = Vue.config.errorHandler
|
||||
Vue.config.errorHandler = function (err, vm, info) {
|
||||
err.statusCode = err.statusCode || 'Whoops!'
|
||||
|
||||
// Show Nuxt Error Page
|
||||
if(vm && vm.$root && vm.$root.$nuxt) {
|
||||
vm.$root.$nuxt.error(err)
|
||||
|
Loading…
Reference in New Issue
Block a user