Skip to content

Commit ba659f8

Browse files
committed
Merge branch 'master' of github.com:launchdarkly/react-client-sdk into contrib
2 parents 65627a6 + 9c77dbf commit ba659f8

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to the LaunchDarkly Client-side SDK for React will be documented in this file. For the source code for versions 2.13.0 and earlier, see the corresponding tags in the [js-client-sdk](https://github.com/launchdarkly/js-client-sdk) repository; this code was previously in a monorepo package there. See also the [JavaScript SDK changelog](https://github.com/launchdarkly/js-client-sdk/blob/master/CHANGELOG.md), since the React SDK inherits all of the underlying functionality of the JavaScript SDK; this file covers only changes that are specific to the React interface. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [2.20.1] - 2020-08-19
6+
### Fixed:
7+
- Fixed an issue where change listeners would update the component state when any flag was modified, even if the client instance was configured such that it was not subscribed for the modified flag. (Thanks, [clayembry](https://github.com/launchdarkly/react-client-sdk/pull/46)!)
8+
59
## [2.20.0] - 2020-07-17
610
### Changed:
711
- Updated `launchdarkly-js-client-sdk` version to 2.18.0, which adds the [`disable-sync-event-post`](https://launchdarkly.github.io/js-client-sdk/interfaces/_launchdarkly_js_client_sdk_.ldoptions.html#disablesynceventpost) option.

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "launchdarkly-react-client-sdk",
3-
"version": "2.20.0",
3+
"version": "2.20.1",
44
"description": "LaunchDarkly SDK for React",
55
"author": "LaunchDarkly <[email protected]>",
66
"license": "Apache-2.0",

src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const getFlattenedFlagsFromChangeset = (
3838
): LDFlagSet => {
3939
const flattened: LDFlagSet = {};
4040
for (const key in changes) {
41-
if (targetFlags === undefined || targetFlags[key] !== undefined) {
41+
if (!targetFlags || targetFlags[key] !== undefined) {
4242
// tslint:disable-next-line:no-unsafe-any
4343
const flagKey = reactOptions.useCamelCaseFlagKeys ? camelCase(key) : key;
4444
flattened[flagKey] = changes[key].current;

0 commit comments

Comments
 (0)