Skip to content

Commit b5c94d0

Browse files
committed
Debug some tests
1 parent d594847 commit b5c94d0

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

sdk/highlight-run/src/client/index.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,12 @@ export class Highlight {
592592
return
593593
}
594594

595-
if (options?.sessionKey) {
596-
if (options?.sessionKey !== this.sessionData.sessionKey) {
597-
await this._reset({ ...options, forceNew: true })
598-
return
599-
}
595+
if (
596+
options?.sessionKey &&
597+
options?.sessionKey !== this.sessionData.sessionKey
598+
) {
599+
await this._reset({ ...options, forceNew: true })
600+
return
600601
}
601602

602603
const sampler = new CustomSampler()

sdk/highlight-run/src/index.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import * as otel from './client/otel'
1010
const sessionData = {
1111
sessionSecureID: 'foo',
1212
projectID: 1,
13-
payloadID: 1,
1413
lastPushTime: new Date().getTime(),
1514
sessionStartTime: new Date().getTime(),
1615
}

sdk/highlight-run/src/sdk/record.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,12 @@ export class RecordSDK implements Record {
415415
return
416416
}
417417

418-
if (options?.sessionKey) {
419-
if (options?.sessionKey !== this.sessionData.sessionKey) {
420-
await this._reset({ ...options, forceNew: true })
421-
return
422-
}
418+
if (
419+
options?.sessionKey &&
420+
options?.sessionKey !== this.sessionData.sessionKey
421+
) {
422+
await this._reset({ ...options, forceNew: true })
423+
return
423424
}
424425

425426
this.logger.log(

0 commit comments

Comments
 (0)