Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit cd52203

Browse files
committed
Merge pull request #368 from Microsoft/propagate-download-dialog-err
Propagate errors thrown in update dialog button press handler
2 parents 37278b4 + 44ba85d commit cd52203

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

CodePush.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,9 @@ async function syncInternal(options = {}, syncStatusChangeCallback, downloadProg
353353
let message = null;
354354
const dialogButtons = [{
355355
text: null,
356-
onPress: async () => {
357-
resolve(await doDownloadAndInstall());
356+
onPress:() => {
357+
doDownloadAndInstall()
358+
.then(resolve, reject);
358359
}
359360
}];
360361

@@ -451,4 +452,4 @@ if (NativeCodePush) {
451452
log("The CodePush module doesn't appear to be properly installed. Please double-check that everything is setup correctly.");
452453
}
453454

454-
module.exports = CodePush;
455+
module.exports = CodePush;

0 commit comments

Comments
 (0)