diff --git a/packages-user/data-common/src/replay/system.ts b/packages-user/data-common/src/replay/system.ts index 235cfcb..afddb7f 100644 --- a/packages-user/data-common/src/replay/system.ts +++ b/packages-user/data-common/src/replay/system.ts @@ -63,7 +63,7 @@ export class ReplaySystem record(code: number, ...params: ReplayParamValue[]): void { this.route.add(code, params); this.forEachHook(hook => - hook.onRecordCommand?.(code, this.route.length, params) + hook.onRecordCommand?.(code, this.route.length - 1, params) ); }