Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

registerAllFlagsListener passes a JSON string to its handler, not an array of flags #93

@vcarl

Description

@vcarl

Is this a support request?
no

Describe the bug
An "all flags" listener is being passed a string representation of a JSON array, not the array itself (which is what the TS types specify it receives).

const handler = (allFlags) => {
  console.log({ allFlags })
}
client.registerAllFlagsListener(handlerId, handler);
// assuming a flag called `'feature-flag'`, what's logged is:
// {"allFlags": "[\"feature-flag\"]"}

To reproduce
see above

Expected behavior
Argument values match their TS types

Logs
n/a

SDK version
4.0.3

Language version, developer tools
React native, I'm not sure what JS version the device is running

OS/platform
Android 11 simulator, Pixel 2 emulator

Additional context
Add any other context about the problem here.

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