From a707999b8d28e8ae31125d34f9ef2b6478426835 Mon Sep 17 00:00:00 2001 From: David Newell Date: Wed, 16 Oct 2024 09:50:38 +0100 Subject: [PATCH] chore: skip if Array.from is missing --- src/extensions/replay/sessionrecording.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extensions/replay/sessionrecording.ts b/src/extensions/replay/sessionrecording.ts index 8c196c883..951784564 100644 --- a/src/extensions/replay/sessionrecording.ts +++ b/src/extensions/replay/sessionrecording.ts @@ -610,13 +610,13 @@ export class SessionRecording { } private _startCapture() { - if (isUndefined(Object.assign)) { + if (isUndefined(Object.assign) || isUndefined(Array.from)) { // According to the rrweb docs, rrweb is not supported on IE11 and below: // "rrweb does not support IE11 and below because it uses the MutationObserver API which was supported by these browsers." // https://github.com/rrweb-io/rrweb/blob/master/guide.md#compatibility-note // // However, MutationObserver does exist on IE11, it just doesn't work well and does not detect all changes. - // Instead, when we load "recorder.js", the first JS error is about "Object.assign" being undefined. + // Instead, when we load "recorder.js", the first JS error is about "Object.assign" and "Array.from" being undefined. // Thus instead of MutationObserver, we look for this function and block recording if it's undefined. return }