From 930f9d845d51024ab3f8578f9815e38ce02bad88 Mon Sep 17 00:00:00 2001 From: Meg Boehlert Date: Tue, 14 May 2024 10:40:59 -0400 Subject: [PATCH] define takeFullSnapshot before use in iframeManager constructor to prevent undefined error --- packages/rrweb/src/record/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/rrweb/src/record/index.ts b/packages/rrweb/src/record/index.ts index 00b43fd67e..cc98b13016 100644 --- a/packages/rrweb/src/record/index.ts +++ b/packages/rrweb/src/record/index.ts @@ -41,8 +41,7 @@ import { } from './error-handler'; let wrappedEmit!: (e: eventWithoutTime, isCheckout?: boolean) => void; - -let takeFullSnapshot!: (isCheckout?: boolean) => void; +let takeFullSnapshot!: (isCheckout?: boolean) => void = () => { /* no-op */ }; let canvasManager!: CanvasManager; let recording = false;