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

Commit bb997f0

Browse files
Maxsergey-akhalkov
authored andcommitted
Fix return value for get update metadata (#864)
* Fixed issue with error on parsing plist path See #534 (comment) for details * Changed return value to null for getUpdateMetadata instead of empty string In accordance with docs and #862
1 parent b8bd4a0 commit bb997f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ protected Void doInBackground(Void... params) {
321321
JSONObject currentPackage = mUpdateManager.getCurrentPackage();
322322

323323
if (currentPackage == null) {
324-
promise.resolve("");
324+
promise.resolve(null);
325325
return null;
326326
}
327327

@@ -335,14 +335,14 @@ protected Void doInBackground(Void... params) {
335335
if (updateState == CodePushUpdateState.PENDING.getValue() && !currentUpdateIsPending) {
336336
// The caller wanted a pending update
337337
// but there isn't currently one.
338-
promise.resolve("");
338+
promise.resolve(null);
339339
} else if (updateState == CodePushUpdateState.RUNNING.getValue() && currentUpdateIsPending) {
340340
// The caller wants the running update, but the current
341341
// one is pending, so we need to grab the previous.
342342
JSONObject previousPackage = mUpdateManager.getPreviousPackage();
343343

344344
if (previousPackage == null) {
345-
promise.resolve("");
345+
promise.resolve(null);
346346
return null;
347347
}
348348

0 commit comments

Comments
 (0)