Uh oh!
There was an error while loading. Please reload this page.
waitForInitialization() should resolve with the client - #106
Conversation
apucacao
commented
Aug 1, 2018
Hi Rich, I'm curious: since you already have |
rmanalan
commented
Aug 1, 2018
@apucacao we're using electrolyte for dependency injection and when I bring in the ldclient, it comes in as a promise... like so: This can then be injected into other modules like so: As you can see in the above code, if I'd used |
eli-darkly
commented
Aug 1, 2018
In general I'm somewhat reluctant to make API design decisions based on what would produce the shortest possible code in one particular framework, but making this change can't hurt. |
rmanalan
commented
Aug 1, 2018
@eli-darkly fwiw, |
It was added to the doc page earlier today, and was already present in |
eli-darkly
commented
Aug 1, 2018
BTW, I only realized this after adding a unit test, but this PR was slightly incomplete - it would not resolve with a value unless |
eli-darkly
commented
Aug 1, 2018
Released in v5.2.0. |
Factor out caching and update queue from redis store for use in dynamo store
It's best to resolve promises with the object that the user expects. This way in an async/await world, the value resolved can be assigned to a var:
In the current version, the above code would yield a
nullorundefinedvalue forldclient.