Skip to content

Synchronous reading of bootstrap #162

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
edvinerikson opened this issue Jul 5, 2019 · 3 comments
Closed

Synchronous reading of bootstrap #162

edvinerikson opened this issue Jul 5, 2019 · 3 comments

Comments

@edvinerikson
Copy link
Contributor

Describe the bug
Calling variation before the ready event fire return undefined despite having bootstrap config provided.
To reproduce
Steps to reproduce the behavior.
https://jsbin.com/xuyatiniva/1/edit?html,output

Expected behavior
I expect that the reading of bootstrap is synchronous to allow for simpler integration in SSR react apps.

SDK version
2.12.2

Additional context
We will have to create a mock client for now and switch to the real client once the ready event is emitted.. but we're not really fond of that idea.

@bwoskow-ld
Copy link
Member

Thanks for the feedback, @edvinerikson!

While LDClient's current behavior works as designed and documented, the behavior you described makes sense to us. We'll take a look at implementing this and will get back to you soon.

@eli-darkly
Copy link
Contributor

eli-darkly commented Jul 9, 2019

This has been changed in the 2.12.3 release to behave in the way you expected (which was also the way it behaved in earlier versions of the SDK; unfortunately we hadn't documented the change, hence I consider this a bug fix).

@edvinerikson
Copy link
Contributor Author

Thank you for such a fast response! 👍🏼

LaunchDarklyCI pushed a commit that referenced this issue Nov 6, 2019
change TS declarations to prefer interfaces over types
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

3 participants