diff --git a/src/extensions/replay/sessionrecording-utils.ts b/src/extensions/replay/sessionrecording-utils.ts index 0122bae9d..02270bdf3 100644 --- a/src/extensions/replay/sessionrecording-utils.ts +++ b/src/extensions/replay/sessionrecording-utils.ts @@ -11,7 +11,7 @@ export function circularReferenceReplacer() { if (isObject(value)) { // `this` is the object that value is contained in, // i.e., its direct parent. - while (ancestors.length > 0 && ancestors.at(-1) !== this) { + while (ancestors.length > 0 && ancestors[ancestors.length - 1] !== this) { ancestors.pop() } if (ancestors.includes(value)) {