fix(vua-app): clone mount error to prevent mutating read-only error object (#5214)

This commit is contained in:
Alexander Lichter 2019-03-12 23:07:38 +01:00 committed by Pooya Parsa
parent 648062c308
commit 37006f6267

View File

@ -81,8 +81,9 @@ const errorHandler = Vue.config.errorHandler || console.error
createApp()
.then(mountApp)
.catch((err) => {
err.message = '[nuxt] Error while mounting app: ' + err.message
errorHandler(err)
const wrapperError = new Error(err)
wrapperError.message = '[nuxt] Error while mounting app: ' + wrapperError.message
errorHandler(wrapperError)
})
function componentOption(component, key, ...args) {