Skip to content

Commit

Permalink
Merge pull request #866 from keuby/log-error
Browse files Browse the repository at this point in the history
fix: log error when mounting failed
  • Loading branch information
bailicangdu authored Sep 18, 2023
2 parents f3422ff + 8fcfc6d commit 296f851
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/create_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,10 @@ export default class CreateApp implements AppInterface {
if (isPromise(umdHookMountResult)) {
umdHookMountResult
.then(() => this.dispatchMountedEvent())
.catch(() => this.dispatchMountedEvent())
.catch((e) => {
logError('An error occurred in window.mount \n', this.name, e)
this.dispatchMountedEvent()
})
} else {
this.dispatchMountedEvent()
}
Expand Down

0 comments on commit 296f851

Please sign in to comment.