Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
Merged
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

All notable changes to the LaunchDarkly React Native SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [4.0.2] - 2021-04-23
### Fixed:
- Android: Fixed an issue where the `jsonVariationDetail` method in `LDClient` returned `Promise<Record<string, any>>` instead of the declared return type of `Promise<LDEvaluationDetail<Record<string, any>>>`.

## [4.1.0] - 2021-04-13
### Added:
- The SDK is now compatible with React Native version 0.64.x. ([#69](https://github.com/launchdarkly/react-native-client-sdk/issues/69))

### Removed:
- The SDK no longer requires React as a peer dependency. React compatibility is dictated based on its compatibility with the React Native version.


## [4.0.1] - 2021-04-06
### Fixed:
- iOS: Internal throttling logic would sometimes delay new poll or stream connections even when there were no recent connections. This caused switching active user contexts using `identify` to sometimes delay retrieving the most recent flags, and therefore delay the completion of the returned Promise.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -758,8 +758,11 @@ private void resolveJsonElement(Promise promise, JsonElement jsonElement) {
}

private void resolveJsonElementDetail(Promise promise, EvaluationDetail<JsonElement> jsonElementDetail) {
JsonElement jsonElement = jsonElementDetail.getValue();
resolveJsonElement(promise, jsonElement);
JsonObject jsonObject = new JsonObject();
jsonObject.add("value", jsonElementDetail.getValue());
jsonObject.addProperty("variationIndex", jsonElementDetail.getVariationIndex());
jsonObject.add("reason", gson.toJsonTree(jsonElementDetail.getReason()));
resolveJsonElement(promise, jsonObject);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class LDClient {

jsonVariationDetail(flagKey, defaultValue) {
if (defaultValue == undefined) {
return LaunchdarklyReactNativeClient.jsonVariatioDetailNone(flagKey);
return LaunchdarklyReactNativeClient.jsonVariationDetailNone(flagKey);
} else if (typeof defaultValue === 'number') {
return LaunchdarklyReactNativeClient.jsonVariationDetailNumber(flagKey, defaultValue);
} else if (typeof defaultValue === 'boolean') {
Expand Down