We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 438eaad commit 69af314Copy full SHA for 69af314
src/lib/js-split-provider.ts
@@ -31,10 +31,15 @@ export class OpenFeatureSplitProvider implements Provider {
31
constructor(options: SplitProviderOptions) {
32
this.client = options.splitClient;
33
this.initialized = new Promise((resolve) => {
34
- this.client.on(this.client.Event.SDK_READY, () => {
+ if ((this.client as any).__getStatus().isReady) {
35
console.log(`${this.metadata.name} provider initialized`);
36
resolve();
37
- });
+ } else {
38
+ this.client.on(this.client.Event.SDK_READY, () => {
39
+ console.log(`${this.metadata.name} provider initialized`);
40
+ resolve();
41
+ });
42
+ }
43
});
44
}
45
0 commit comments