mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-27 13:52:38 +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
|
// Setup global Vue error handler
|
||||||
const defaultErrorHandler = Vue.config.errorHandler
|
const defaultErrorHandler = Vue.config.errorHandler
|
||||||
Vue.config.errorHandler = function (err, vm, info) {
|
Vue.config.errorHandler = function (err, vm, info) {
|
||||||
|
err.statusCode = err.statusCode || 'Whoops!'
|
||||||
|
|
||||||
// Show Nuxt Error Page
|
// Show Nuxt Error Page
|
||||||
if(vm && vm.$root && vm.$root.$nuxt) {
|
if(vm && vm.$root && vm.$root.$nuxt) {
|
||||||
vm.$root.$nuxt.error(err)
|
vm.$root.$nuxt.error(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user