check if package metadata is null (#992)

This commit is contained in:
Andrew Jack
2017-09-12 08:56:12 +01:00
committed by Max
parent 359ab9819c
commit d37ee85620

View File

@@ -184,7 +184,7 @@ public class CodePush implements ReactPackage {
JSONObject pendingUpdate = mSettingsManager.getPendingUpdate();
if (pendingUpdate != null) {
JSONObject packageMetadata = this.mUpdateManager.getCurrentPackage();
if (!isPackageBundleLatest(packageMetadata) && hasBinaryVersionChanged(packageMetadata)) {
if (packageMetadata == null || !isPackageBundleLatest(packageMetadata) && hasBinaryVersionChanged(packageMetadata)) {
CodePushUtils.log("Skipping initializeUpdateAfterRestart(), binary version is newer");
return;
}