Skip to content

Commit

Permalink
chore: skip if Array.from is missing (#1475)
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin authored Oct 16, 2024
1 parent 51050f4 commit bd173b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extensions/replay/sessionrecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,13 +625,13 @@ export class SessionRecording {
}

private _startCapture(startReason?: SessionStartReason) {
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
}
Expand Down

0 comments on commit bd173b2

Please sign in to comment.