Skip to content

Commit b5172cd

Browse files
committed
fix: browser compat breaks due to start call being required
1 parent ad18342 commit b5172cd

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

packages/sdk/browser/src/compat/LDClientCompatImpl.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,20 @@ export default class LDClientCompatImpl implements LDClient {
4545
this._client = makeClient(envKey, context, AutoEnvAttributes.Disabled, options);
4646
this._emitter = new LDEmitterCompat(this._client);
4747
this.logger = this._client.logger;
48-
this._initIdentify(context, bootstrap, hash);
48+
this._initIdentify(bootstrap, hash);
4949
}
5050

51-
private async _initIdentify(
52-
context: LDContext,
53-
bootstrap?: LDFlagSet,
54-
hash?: string,
55-
): Promise<void> {
51+
private async _initIdentify(bootstrap?: LDFlagSet, hash?: string): Promise<void> {
5652
try {
57-
const result = await this._client.identify(context, {
58-
noTimeout: true,
59-
bootstrap,
60-
hash,
61-
sheddable: false,
53+
const result = await this._client.start({
54+
identifyOptions: {
55+
noTimeout: true,
56+
bootstrap,
57+
hash,
58+
},
6259
});
6360

64-
if (result.status === 'error') {
61+
if (result.status === 'failed') {
6562
throw result.error;
6663
} else if (result.status === 'timeout') {
6764
throw new LDTimeoutError('Identify timed out');

0 commit comments

Comments
 (0)