Skip to content

Commit 48334f3

Browse files
committed
chore: addressing cursor comment
1 parent 158db3f commit 48334f3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/sdk/browser/src/BrowserClient.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,14 @@ class BrowserClientImpl extends LDClientImpl {
230230

231231
if (!this._identifyAttempted && identifyOptionsWithUpdatedDefaults.bootstrap) {
232232
this._identifyAttempted = true;
233-
const bootstrapData = readFlagsFromBootstrap(
234-
this.logger,
235-
identifyOptionsWithUpdatedDefaults.bootstrap,
236-
);
237233
try {
234+
const bootstrapData = readFlagsFromBootstrap(
235+
this.logger,
236+
identifyOptionsWithUpdatedDefaults.bootstrap,
237+
);
238238
this.presetFlags(bootstrapData);
239-
} catch {
240-
this.logger.error('Failed to bootstrap data');
239+
} catch (error) {
240+
this.logger.error('Failed to bootstrap data', error);
241241
}
242242
}
243243

packages/shared/sdk-client/src/context/ensureKey.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@launchdarkly/js-sdk-common';
1111

1212
import { getOrGenerateKey } from '../storage/getOrGenerateKey';
13-
import { namespaceForGeneratedContextKey } from '../storage/namespaceUtils';
13+
import { namespaceForAnonymousGeneratedContextKey } from '../storage/namespaceUtils';
1414

1515
const { isLegacyUser, isMultiKind, isSingleKind } = internal;
1616

@@ -31,7 +31,7 @@ const ensureKeyCommon = async (kind: string, c: LDContextCommon, platform: Platf
3131
const { anonymous, key } = c;
3232

3333
if (anonymous && !key) {
34-
const storageKey = await namespaceForGeneratedContextKey(kind);
34+
const storageKey = await namespaceForAnonymousGeneratedContextKey(kind);
3535
// This mutates a cloned copy of the original context from ensureyKey so this is safe.
3636
// eslint-disable-next-line no-param-reassign
3737
c.key = await getOrGenerateKey(storageKey, platform);

0 commit comments

Comments
 (0)