From 420cd237df51eac139b4c69e49e2d33aee20ea59 Mon Sep 17 00:00:00 2001 From: llama Date: Thu, 22 May 2025 21:11:04 +0800 Subject: [PATCH] fix io undo logic error (#4027) --- ts/routes/image-occlusion/tools/tool-undo-redo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/routes/image-occlusion/tools/tool-undo-redo.ts b/ts/routes/image-occlusion/tools/tool-undo-redo.ts index 187a8b33d..0785d3908 100644 --- a/ts/routes/image-occlusion/tools/tool-undo-redo.ts +++ b/ts/routes/image-occlusion/tools/tool-undo-redo.ts @@ -117,7 +117,7 @@ class UndoStack { private push(): void { const entry = JSON.stringify(this.canvas?.toJSON(["id"])); - if (entry === this.stack[this.stack.length - 1]) { + if (entry === this.stack[this.index]) { return; } this.stack.length = this.index + 1;