[config] Return null/nil values on success
This commit is contained in:
parent
c4b43a5184
commit
0a1ab7b8dd
|
@ -120,7 +120,7 @@ class RNFirebaseRemoteConfig extends ReactContextBaseJavaModule {
|
|||
@Override
|
||||
public void onComplete(@NonNull Task<Void> task) {
|
||||
if (task.isSuccessful()) {
|
||||
promise.resolve("config/success");
|
||||
promise.resolve(null);
|
||||
} else {
|
||||
if (task.getException() instanceof FirebaseRemoteConfigFetchThrottledException) {
|
||||
promise.reject("config/throttled", "fetch() operation cannot be completed successfully, due to throttling.", task.getException());
|
||||
|
@ -159,7 +159,6 @@ class RNFirebaseRemoteConfig extends ReactContextBaseJavaModule {
|
|||
map.putNull(NUMBER_VALUE);
|
||||
}
|
||||
|
||||
// TODO check with ios
|
||||
switch (value.getSource()) {
|
||||
case FirebaseRemoteConfig.VALUE_SOURCE_DEFAULT:
|
||||
map.putString(SOURCE, "default");
|
||||
|
|
|
@ -61,7 +61,7 @@ RCT_EXPORT_METHOD(fetch:
|
|||
if (error) {
|
||||
reject(convertFIRRemoteConfigFetchStatusToNSString(status), convertFIRRemoteConfigFetchStatusToNSStringDescription(status), error);
|
||||
} else {
|
||||
resolve(convertFIRRemoteConfigFetchStatusToNSString(status));
|
||||
resolve(nil);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ RCT_EXPORT_METHOD(fetchWithExpirationDuration:
|
|||
if (error) {
|
||||
reject(convertFIRRemoteConfigFetchStatusToNSString(status), convertFIRRemoteConfigFetchStatusToNSStringDescription(status), error);
|
||||
} else {
|
||||
resolve(convertFIRRemoteConfigFetchStatusToNSString(status));
|
||||
resolve(nil);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue