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

Commit aa45601

Browse files
committed
Update CodePush.js
1 parent 37278b4 commit aa45601

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CodePush.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,11 @@ async function syncInternal(options = {}, syncStatusChangeCallback, downloadProg
354354
const dialogButtons = [{
355355
text: null,
356356
onPress: async () => {
357-
resolve(await doDownloadAndInstall());
357+
try {
358+
resolve(await doDownloadAndInstall());
359+
} catch (downloadError) {
360+
reject(downloadError);
361+
}
358362
}
359363
}];
360364

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

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

0 commit comments

Comments
 (0)