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

Commit d82c7f1

Browse files
Merge pull request #397 from convoyinc/nevir/status-report-bugfix
Bug fix for #379 where status report can be undefined on notifyApplicationReady
2 parents 4901346 + 2b62800 commit d82c7f1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CodePush.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const notifyApplicationReady = (() => {
173173
async function notifyApplicationReadyInternal() {
174174
await NativeCodePush.notifyApplicationReady();
175175
const statusReport = await NativeCodePush.getNewStatusReport();
176-
tryReportStatus(statusReport); // Don't wait for this to complete.
176+
statusReport && tryReportStatus(statusReport); // Don't wait for this to complete.
177177

178178
return statusReport;
179179
}

typings/react-native-code-push.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ declare namespace CodePush {
243243
/**
244244
* Notifies the CodePush runtime that an installed update is considered successful.
245245
*/
246-
function notifyAppReady(): Promise<StatusReport>;
246+
function notifyAppReady(): Promise<StatusReport|void>;
247247

248248
/**
249249
* Allow CodePush to restart the app.

0 commit comments

Comments
 (0)