mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-11 16:20:26 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
2
typings/react-native-code-push.d.ts
vendored
2
typings/react-native-code-push.d.ts
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user