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() createApp()
.then(mountApp) .then(mountApp)
.catch((err) => { .catch((err) => {
err.message = '[nuxt] Error while mounting app: ' + err.message const wrapperError = new Error(err)
errorHandler(err) wrapperError.message = '[nuxt] Error while mounting app: ' + wrapperError.message
errorHandler(wrapperError)
}) })
function componentOption(component, key, ...args) { function componentOption(component, key, ...args) {