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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix: fix transformStyle (#5071)
wpxp1234563808a6fa05f0
diff --git a/packages/sheets-ui/src/commands/commands/__tests__/auto-fill.controller.spec.ts b/packages/sheets-ui/src/commands/commands/__tests__/auto-fill.controller.spec.tsindex f9bf15b779..ed09dc88d2 100644--- a/packages/sheets-ui/src/commands/commands/__tests__/auto-fill.controller.spec.ts+++ b/packages/sheets-ui/src/commands/commands/__tests__/auto-fill.controller.spec.ts@@ -790,8 +790,6 @@ describe('Test auto fill rules in controller', () => {bg: {rgb: '#eee',},- ht: null,- vt: null,});// undo redo@@ -802,8 +800,6 @@ describe('Test auto fill rules in controller', () => {bg: {rgb: '#eee',},- ht: null,- vt: null,});// redo@@ -814,8 +810,6 @@ describe('Test auto fill rules in controller', () => {bg: {rgb: '#eee',},- ht: null,- vt: null,});});});diff --git a/packages/sheets/src/basics/cell-style.ts b/packages/sheets/src/basics/cell-style.tsindex dc1279727b..f9d233d18f 100644--- a/packages/sheets/src/basics/cell-style.ts+++ b/packages/sheets/src/basics/cell-style.ts@@ -79,7 +79,7 @@ export function transformStyle(oldStyle: Nullable<IStyleData>, newStyle: Nullablif (!newStyle || !Object.keys(newStyle).length) {return oldStyle;}- const backupStyle: Record<string, any> = oldStyle || {};+ const backupStyle: Record<string, any> = Tools.deepClone(oldStyle ?? {});for (const k in newStyle) {if (k === 'bd') {