Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscribeToChanges always uses camelCase #63

Closed
enceeobee opened this issue Sep 16, 2021 · 1 comment
Closed

subscribeToChanges always uses camelCase #63

enceeobee opened this issue Sep 16, 2021 · 1 comment

Comments

@enceeobee
Copy link
Contributor

Hello 馃憢 ,

First, thank you for this package! It's wonderful 馃槃

Issue

I recently noticed that subscribeToChanges always uses a camelCase flag key when updating the store, even when useCamelCaseFlagKeys is set to false.

I don't think the fix should be too difficult, and I can probably supply a PR for it soon, but I wanted to open an issue for posterity.

Steps to reproduce

  1. init ld-redux setting useCamelCaseFlagKeys to false

    ldRedux.init({
      clientSideId: 'your-client-side-id',
      dispatch: store.dispatch,
      useCamelCaseFlagKeys: false
    });
  2. Later, identify a new user, which will dispatch an event(s) to update the store once the new flag values are ready

    window.ldClient.identify({key: 'someUserId'});
  3. Observe that the flag key in the SET_FLAG action is incorrectly sent in camelCase (e.g. 'my-kebab-case-flag' is updated as 'myKebabCaseFlag')

Screenshots

Here's an example of a flag being updated in camelCase, when it should be kebab-case

camelCase

@yusinto
Copy link
Owner

yusinto commented Oct 6, 2021

The fix for this has been merged and released in v3.3.4.

@yusinto yusinto closed this as completed Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants