diff --git a/packages/rrweb/src/record/index.ts b/packages/rrweb/src/record/index.ts index 756c21c56b..a639975376 100644 --- a/packages/rrweb/src/record/index.ts +++ b/packages/rrweb/src/record/index.ts @@ -518,6 +518,9 @@ function record( } return () => { handlers.forEach((h) => h()); + // reset init fns when stopping record + (wrappedEmit as unknown) = undefined; + (takeFullSnapshot as unknown) = undefined; }; } catch (error) { // TODO: handle internal error