diff --git a/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java b/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java index e8ccd9f..fbf7134 100644 --- a/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +++ b/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java @@ -321,7 +321,7 @@ public class CodePushNativeModule extends ReactContextBaseJavaModule { JSONObject currentPackage = mUpdateManager.getCurrentPackage(); if (currentPackage == null) { - promise.resolve(""); + promise.resolve(null); return null; } @@ -335,14 +335,14 @@ public class CodePushNativeModule extends ReactContextBaseJavaModule { if (updateState == CodePushUpdateState.PENDING.getValue() && !currentUpdateIsPending) { // The caller wanted a pending update // but there isn't currently one. - promise.resolve(""); + promise.resolve(null); } else if (updateState == CodePushUpdateState.RUNNING.getValue() && currentUpdateIsPending) { // The caller wants the running update, but the current // one is pending, so we need to grab the previous. JSONObject previousPackage = mUpdateManager.getPreviousPackage(); if (previousPackage == null) { - promise.resolve(""); + promise.resolve(null); return null; }