Skip to content

Commit

Permalink
fix: Add fallback for currentBufferTarget (#861)
Browse files Browse the repository at this point in the history
  • Loading branch information
metal-messiah authored Jan 19, 2024
1 parent 8e5a877 commit f43b791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/features/session_replay/shared/recorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class Recorder {
store (event, isCheckout) {
event.__serialized = stringify(event)

if (!this.parent.scheduler) this.currentBufferTarget = this.#preloaded[this.#preloaded.length - 1]
if (!this.parent.scheduler && this.#preloaded.length) this.currentBufferTarget = this.#preloaded[this.#preloaded.length - 1]
else this.currentBufferTarget = this.#events

if (this.parent.blocked) return
Expand Down

0 comments on commit f43b791

Please sign in to comment.