fix(replay): enable recording guard; update tests for replay refactor

This commit is contained in:
AncTe committed 2026-09-14 20:14:01 +08:00
1 parent 17d7c8f46a
commit c08f3f8484
7 files changed
+58 -70

No files matched your search

@@ -390,7 +390,7 @@ export class ReplayArray implements IReplayArray {
}
add(command: number, params: ReplayParamValue[]): void {
if (this.disabled >= 0) return;
if (this.disabled > 0) return;
const normalized = this.normalizeParamList(params);
const length = this.calculateParamsLength(normalized);
this.checkBufferExpand(length);
@@ -410,7 +410,7 @@ export class ReplayArray implements IReplayArray {
}
insert(index: number, command: number, params: ReplayParamValue[]): void {
if (this.disabled >= 0) return;
if (this.disabled > 0) return;
const normalized = this.normalizeParamList(params);
const length = this.calculateParamsLength(normalized);
this.checkBufferExpand(length);
@@ -440,7 +440,7 @@ export class ReplayArray implements IReplayArray {
}
delete(index: number): void {
if (this.disabled >= 0) return;
if (this.disabled > 0) return;
const commandSize = this.getCommandSize();
const commandStart = index * commandSize;
const paramStart = this.indexArray[index];
@@ -474,7 +474,7 @@ export class ReplayArray implements IReplayArray {
}
set(index: number, command: number, params: ReplayParamValue[]): void {
if (this.disabled >= 0) return;
if (this.disabled > 0) return;
const normalized = this.normalizeParamList(params);
const length = this.calculateParamsLength(normalized);
const paramStart = this.indexArray[index];