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

Commit d37ee85

Browse files
AndrewJackMax
authored andcommitted
check if package metadata is null (#992)
1 parent 359ab98 commit d37ee85

File tree

1 file changed

+1
-1
lines changed
  • android/app/src/main/java/com/microsoft/codepush/react

1 file changed

+1
-1
lines changed

android/app/src/main/java/com/microsoft/codepush/react/CodePush.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ void initializeUpdateAfterRestart() {
184184
JSONObject pendingUpdate = mSettingsManager.getPendingUpdate();
185185
if (pendingUpdate != null) {
186186
JSONObject packageMetadata = this.mUpdateManager.getCurrentPackage();
187-
if (!isPackageBundleLatest(packageMetadata) && hasBinaryVersionChanged(packageMetadata)) {
187+
if (packageMetadata == null || !isPackageBundleLatest(packageMetadata) && hasBinaryVersionChanged(packageMetadata)) {
188188
CodePushUtils.log("Skipping initializeUpdateAfterRestart(), binary version is newer");
189189
return;
190190
}

0 commit comments

Comments
 (0)