mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
fix(vue-app): Call Vue.config.errorHandler instead of simply logging the error
This commit is contained in:
parent
59aee74a88
commit
6c4280f87f
@ -69,14 +69,14 @@ if (!Vue.config.$nuxt) {
|
||||
Vue.config.$nuxt = {}
|
||||
}
|
||||
Vue.config.$nuxt.<%= globals.nuxt %> = true
|
||||
|
||||
<% } %>
|
||||
|
||||
// Create and mount App
|
||||
createApp()
|
||||
.then(mountApp)
|
||||
.catch((err) => {
|
||||
console.error('[nuxt] Error while initializing app', err)
|
||||
err.message = '[nuxt] Error while mounting app: ' + err.message
|
||||
Vue.config.errorHandler(err)
|
||||
})
|
||||
|
||||
function componentOption(component, key, ...args) {
|
||||
@ -674,7 +674,7 @@ async function mountApp(__app) {
|
||||
// Push the path and then mount app
|
||||
router.push(path, () => mount(), (err) => {
|
||||
if (!err) return mount()
|
||||
console.error(err)
|
||||
Vue.config.errorHandler(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user