Merge pull request #397 from convoyinc/nevir/status-report-bugfix

Bug fix for #379 where status report can be undefined on notifyApplicationReady
This commit is contained in:
Jonathan Carter
2016-06-23 14:06:37 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -173,7 +173,7 @@ const notifyApplicationReady = (() => {
async function notifyApplicationReadyInternal() {
await NativeCodePush.notifyApplicationReady();
const statusReport = await NativeCodePush.getNewStatusReport();
tryReportStatus(statusReport); // Don't wait for this to complete.
statusReport && tryReportStatus(statusReport); // Don't wait for this to complete.
return statusReport;
}

View File

@@ -243,7 +243,7 @@ declare namespace CodePush {
/**
* Notifies the CodePush runtime that an installed update is considered successful.
*/
function notifyAppReady(): Promise<StatusReport>;
function notifyAppReady(): Promise<StatusReport|void>;
/**
* Allow CodePush to restart the app.