Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make storage provider & initialize synchronous (#305)
openAI reported: The Statsig.start() API previously made Statsig available to query feature flags as soon as it returned (because the client variable is set synchronously). However, when passing a storageProvider object, it now performs a DispatchQueue.main.async call before setting client. This means that all the checkGate() calls we make immediately after result in seeing this in the console: `[Statsig]: Must start Statsig first and wait for it to complete before calling checkGate. Returning false as the default.` I don't see a reason for this DispatchQueue.main.async . Could this be changed so initialization is consistent whether passing storageProvider or not?
- Loading branch information