fix: reset fns when when stopping record (#962)

Co-authored-by: wangfukang <wangfukang@kuaishou.com>
This commit is contained in:
fukang wang
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 5fdc817e06
commit a04f01e6b3

View File

@@ -531,6 +531,9 @@ function record<T = eventWithTime>(
}
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