diff --git a/packages/sheets-drawing-ui/src/controllers/sheet-drawing-transform-affected.controller.ts b/packages/sheets-drawing-ui/src/controllers/sheet-drawing-transform-affected.controller.ts index 0eb5f60592..443529ee8f 100644 --- a/packages/sheets-drawing-ui/src/controllers/sheet-drawing-transform-affected.controller.ts +++ b/packages/sheets-drawing-ui/src/controllers/sheet-drawing-transform-affected.controller.ts @@ -381,6 +381,10 @@ export class SheetDrawingTransformAffectedController extends Disposable { } private _createUndoAndRedoMutation(unitId: string, subUnitId: string, updateDrawings: ISheetDrawing[]) { + if (updateDrawings.length === 0) { + return { redos: [], undos: [] }; + } + const updateJsonOp = this._sheetDrawingService.getBatchUpdateOp(updateDrawings as ISheetDrawing[]) as IDrawingJsonUndo1; const { undo, redo, objects } = updateJsonOp; const redos: IMutationInfo[] = [