diff --git a/lib/app/client.js b/lib/app/client.js index 33949f98c2..dcb705efc1 100644 --- a/lib/app/client.js +++ b/lib/app/client.js @@ -37,14 +37,21 @@ Vue.config.errorHandler = function (err, vm, info) { message: err.message || err.toString() } + // Call other handler if exist + let handled = null + if (typeof defaultErrorHandler === 'function') { + handled = defaultErrorHandler(...arguments) + } + if(handled === true){ + return handled + } + // Show Nuxt Error Page if(vm && vm.$root && vm.$root.$nuxt && vm.$root.$nuxt.error && info !== 'render function') { vm.$root.$nuxt.error(nuxtError) } - - // Call other handler if exist if (typeof defaultErrorHandler === 'function') { - return defaultErrorHandler(...arguments) + return handled } // Log to console