Skip to content

Commit

Permalink
fix(auto-updater): handle errors during emit
Browse files Browse the repository at this point in the history
Close #1310
  • Loading branch information
develar committed Feb 28, 2017
1 parent 0bba4fe commit ef9b5a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/electron-updater/src/AppUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ export abstract class AppUpdater extends EventEmitter {
}

private async _checkForUpdates(): Promise<UpdateCheckResult> {
await this.untilAppReady
try {
await this.untilAppReady

if (this.logger != null) {
this.logger.info("Checking for update")
}
if (this.logger != null) {
this.logger.info("Checking for update")
}

this.emit("checking-for-update")
try {
this.emit("checking-for-update")
return await this.doCheckForUpdates()
}
catch (e) {
Expand Down

0 comments on commit ef9b5a6

Please sign in to comment.