Skip to content

Commit ef733c0

Browse files
committed
fixes
1 parent 6b77c3c commit ef733c0

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

packages/browser-integration-tests/suites/replay/bufferModeReload/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
</head>
66
<body>
77
<button onclick="console.log('Test log 1')" id="button1">Click me</button>
8-
<button onclick="window.doesNotExist()" id="buttonError">Click me</button>
8+
<button onclick="Sentry.captureException('test error')" id="buttonError">Click me</button>
99
</body>
1010
</html>

packages/replay/src/replay.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,9 @@ export class ReplayContainer implements ReplayContainerInterface {
243243
return;
244244
}
245245

246-
let recordingMode: ReplayRecordingMode = 'session';
247-
248246
// If segmentId > 0, it means we've previously already captured this session
249247
// In this case, we still want to continue in `session` recording mode
250-
if (this.session.sampled === 'buffer' && this.session.segmentId === 0) {
251-
recordingMode = 'buffer';
252-
}
253-
254-
this.recordingMode = recordingMode;
248+
this.recordingMode = this.session.sampled === 'buffer' && this.session.segmentId === 0 ? 'buffer' : 'session';
255249

256250
logInfoNextTick(
257251
`[Replay] Starting replay in ${this.recordingMode} mode`,

0 commit comments

Comments
 (0)