From dbd0219f0fd546b32fbf37f630783240d30f5820 Mon Sep 17 00:00:00 2001 From: JackyChen02 <70377567+JackyChen02@users.noreply.github.com> Date: Fri, 28 Jul 2023 10:52:28 +0800 Subject: [PATCH] fix: updateCellId api bug (#3816) --- packages/x6/src/model/model.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/x6/src/model/model.ts b/packages/x6/src/model/model.ts index e5b347711cc..f30b71e765e 100644 --- a/packages/x6/src/model/model.ts +++ b/packages/x6/src/model/model.ts @@ -340,6 +340,7 @@ export class Model extends Basecoat { } updateCellId(cell: Cell, newId: string) { + if (cell.id === newId) return this.startBatch('update', { id: newId }) cell.prop('id', newId) const newCell = cell.clone({ keepId: true })