Skip to content

Commit

Permalink
fix: use trigger statuses correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Borcsik committed Oct 14, 2024
1 parent 2460cce commit e0a2e82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/extensions/replay/sessionrecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export class SessionRecording {
}

private get fullSnapshotIntervalMillis(): number {
if (this.urlTriggerStatus === 'pending') {
if (this.urlTriggerStatus === 'trigger_pending') {
return ONE_MINUTE
}

Expand Down Expand Up @@ -973,7 +973,7 @@ export class SessionRecording {
}

// Clear the buffer if waiting for a trigger, and only keep data from after the current full snapshot
if (rawEvent.type === EventType.FullSnapshot && this.urlTriggerStatus === 'pending') {
if (rawEvent.type === EventType.FullSnapshot && this.urlTriggerStatus === 'trigger_pending') {
this.clearBuffer()
}

Expand Down Expand Up @@ -1175,8 +1175,8 @@ export class SessionRecording {
}

private _activateUrlTrigger() {
if (this.urlTriggerStatus === 'pending') {
this.urlTriggerStatus = 'activated'
if (this.urlTriggerStatus === 'trigger_pending') {
this.urlTriggerStatus = 'trigger_activated'
this._tryAddCustomEvent('url trigger activated', {})
this._flushBuffer()
logger.info(LOGGER_PREFIX + ' recording triggered by URL pattern match')
Expand Down

0 comments on commit e0a2e82

Please sign in to comment.