From a3e0036d4598f153ea1354e24c960786218d5f55 Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Sat, 15 Oct 2022 18:16:28 +0200 Subject: [PATCH] fix last minute change --- packages/rrweb/src/record/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/rrweb/src/record/index.ts b/packages/rrweb/src/record/index.ts index 8436a583ec..ef590e418e 100644 --- a/packages/rrweb/src/record/index.ts +++ b/packages/rrweb/src/record/index.ts @@ -25,6 +25,7 @@ import { scrollCallback, canvasMutationParam, adoptedStyleSheetParam, + IWindow, } from '../types'; import { IframeManager } from './iframe-manager'; import { ShadowDomManager } from './shadow-dom-manager'; @@ -71,11 +72,12 @@ function record( userTriggeredOnInput = false, collectFonts = false, inlineImages = false, - window: win = window, + window: _win = window, plugins, keepIframeSrcFn = () => false, ignoreCSSAttributes = new Set([]), } = options; + const win = (_win as unknown) as IWindow; // runtime checks for user options if (!emit) { @@ -251,7 +253,7 @@ function record( canvasManager = new CanvasManager({ recordCanvas, mutationCb: wrappedCanvasMutationEmit, - win: win, + win, blockClass, blockSelector, mirror, @@ -281,6 +283,7 @@ function record( stylesheetManager, canvasManager, keepIframeSrcFn, + window: win, }, mirror, });