Skip to content

Client SDK's useFlag is not returning flag when the key is camel case #331

@lamesjim

Description

@lamesjim

Is this a support request?
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going here or by emailing support@launchdarkly.com.

Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.

Describe the bug
My application is using both the server and client SDKs. When the flag key is camel cased (e.g. myFlagKey), the client SDK doesn't return it when calling useFlags().

To reproduce

  • create a flag in Launch Darkly using camel case in the key
  • call useFlags from the Client SDK
  • flag should be undefined

Expected behavior
useFlags() should return any flag when the key is either camel or kebab case

Logs
n/a

SDK version
^3.6.1

Language version, developer tools
Node v20.16.0
NextJS ~14.2.32
React ^18.3.1

OS/platform
MacOS 26.1 (local)
Alpine Linux 3.22 (staging)
Chrome 142.0.7444.162

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions