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: destructuring assignment does not take effect for null (#3955)
lumix74de2ccea633
diff --git a/packages/core/src/sheets/util.ts b/packages/core/src/sheets/util.tsindex 1b6ddc8b41..9ba4c7b93e 100644--- a/packages/core/src/sheets/util.ts+++ b/packages/core/src/sheets/util.ts@@ -65,14 +65,14 @@ export function createDocumentModelWithStyle(content: string, textStyle: ITextStconst contentLength = content.length;const {textRotation,- paddingData = DEFAULT_PADDING_DATA,+ paddingData,horizontalAlign = HorizontalAlign.UNSPECIFIED,verticalAlign = VerticalAlign.UNSPECIFIED,wrapStrategy = WrapStrategy.UNSPECIFIED,cellValueType,} = config;- const { t: marginTop, r: marginRight, b: marginBottom, l: marginLeft } = paddingData;+ const { t: marginTop, r: marginRight, b: marginBottom, l: marginLeft } = paddingData || DEFAULT_PADDING_DATA;const { vertexAngle, centerAngle } = convertTextRotation(textRotation);const documentData: IDocumentData = {id: 'd',diff --git a/packages/engine-render/src/components/sheets/util.ts b/packages/engine-render/src/components/sheets/util.tsindex 5dae347b0f..37b933025c 100644--- a/packages/engine-render/src/components/sheets/util.ts+++ b/packages/engine-render/src/components/sheets/util.ts@@ -33,14 +33,14 @@ export function createDocumentModelWithStyle(content: string, textStyle: ITextStconst contentLength = content.length;const {textRotation,- paddingData = DEFAULT_PADDING_DATA,+ paddingData,horizontalAlign = HorizontalAlign.UNSPECIFIED,verticalAlign = VerticalAlign.UNSPECIFIED,wrapStrategy = WrapStrategy.UNSPECIFIED,cellValueType,} = config;- const { t: marginTop, r: marginRight, b: marginBottom, l: marginLeft } = paddingData;+ const { t: marginTop, r: marginRight, b: marginBottom, l: marginLeft } = paddingData || DEFAULT_PADDING_DATA;const { vertexAngle, centerAngle } = convertTextRotation(textRotation);const documentData: IDocumentData = {id: 'd',