Skip to content

Commit 5616b9b

Browse files
billyvgmydea
authored andcommitted
fix(replay): Fix ts errors with replay_type
Fixes type error from #6658 (semantic merge issue).
1 parent 2fbd835 commit 5616b9b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/replay/src/replay.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ export class ReplayContainer implements ReplayContainerInterface {
922922
const transport = client && client.getTransport();
923923
const dsn = client?.getDsn();
924924

925-
if (!client || !scope || !transport || !dsn) {
925+
if (!client || !scope || !transport || !dsn || !this.session || !this.session.sampled) {
926926
return;
927927
}
928928

@@ -936,7 +936,7 @@ export class ReplayContainer implements ReplayContainerInterface {
936936
urls,
937937
replay_id: replayId,
938938
segment_id,
939-
replay_type: this.session?.sampled,
939+
replay_type: this.session.sampled,
940940
};
941941

942942
const replayEvent = await getReplayEvent({ scope, client, replayId, event: baseEvent });

packages/types/src/replay.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export interface ReplayEvent extends Event {
1010
trace_ids: string[];
1111
replay_id: string;
1212
segment_id: number;
13+
replay_type: 'session' | 'error';
1314
}
1415

1516
/**

0 commit comments

Comments
 (0)