Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ protected Void doInBackground(Void... params) {
JSONObject currentPackage = mUpdateManager.getCurrentPackage();

if (currentPackage == null) {
promise.resolve("");
promise.resolve(null);
return null;
}

Expand All @@ -333,14 +333,14 @@ protected Void doInBackground(Void... params) {
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;
}

Expand Down