Skip to content

Commit

Permalink
Merge branch 'master' into fix-sync-options-typing
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailSuendukov authored Mar 22, 2024
2 parents e781f01 + d57066b commit d4ad8b1
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,16 @@ void initializeUpdateAfterRestart() {

JSONObject pendingUpdate = mSettingsManager.getPendingUpdate();
if (pendingUpdate != null) {
JSONObject packageMetadata = this.mUpdateManager.getCurrentPackage();
JSONObject packageMetadata = null;

try {
packageMetadata = this.mUpdateManager.getCurrentPackage();
} catch (CodePushMalformedDataException e) {
// We need to recover the app in case 'codepush.json' is corrupted
CodePushUtils.log(e);
clearUpdates();
return;
}
if (packageMetadata == null || !isPackageBundleLatest(packageMetadata) && hasBinaryVersionChanged(packageMetadata)) {
CodePushUtils.log("Skipping initializeUpdateAfterRestart(), binary version is newer");
return;
Expand Down

0 comments on commit d4ad8b1

Please sign in to comment.