Skip to content

Commit 156045a

Browse files
committed
Fix optionality.
1 parent 2921096 commit 156045a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/sdk/browser/src/BrowserDataManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ export default class BrowserDataManager extends BaseDataManager {
7373
identifyOptions?: LDIdentifyOptions,
7474
): Promise<void> {
7575
this.context = context;
76-
const browserIdentifyOptions = identifyOptions as BrowserIdentifyOptions;
77-
if (browserIdentifyOptions.hash) {
76+
const browserIdentifyOptions = identifyOptions as BrowserIdentifyOptions | undefined;
77+
if (browserIdentifyOptions?.hash) {
7878
this.setConnectionParams({
7979
queryParameters: [{ key: 'h', value: browserIdentifyOptions.hash }],
8080
});
8181
} else {
8282
this.setConnectionParams();
8383
}
84-
this.secureModeHash = browserIdentifyOptions.hash;
84+
this.secureModeHash = browserIdentifyOptions?.hash;
8585
if (await this.flagManager.loadCached(context)) {
8686
this.debugLog('Identify - Flags loaded from cache. Continuing to initialize via a poll.');
8787
}

0 commit comments

Comments
 (0)