Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(sheet): fix code error, the style always is a object (#6289)

VicKun979d638d9333
diff --git a/packages/engine-render/src/components/sheets/sheet.render-skeleton.ts b/packages/engine-render/src/components/sheets/sheet.render-skeleton.ts
index 31b22b7642..3682102eca 100644
--- a/packages/engine-render/src/components/sheets/sheet.render-skeleton.ts
+++ b/packages/engine-render/src/components/sheets/sheet.render-skeleton.ts
@@ -1458,7 +1458,7 @@ export class SpreadsheetSkeleton extends SheetSkeleton {
const cell = this.worksheet.getCell(row, col) || this.worksheet.getCellRaw(row, col);
const style = this.worksheet.getComposedCellStyleByCellData(row, col, cell);
- if (!cell && !style) return;
+ if (!cell && Object.keys(style).length === 0) return;
this._setBgStylesCache(row, col, style, options);
this._setBorderStylesCache(row, col, style, options);