diff --git a/packages/rrweb/src/record/index.ts b/packages/rrweb/src/record/index.ts index c5fc3ed580..09f786f58e 100644 --- a/packages/rrweb/src/record/index.ts +++ b/packages/rrweb/src/record/index.ts @@ -53,10 +53,9 @@ import { } from './error-handler'; function wrapEvent(e: event): eventWithTime { - return { - ...e, - timestamp: nowTimestamp(), - }; + const eWithTime = e as eventWithTime; + eWithTime.timestamp = nowTimestamp(); + return eWithTime; } declare global {