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
chore: fix celldata reference (#4407)
ybzky407f68bd208b
diff --git a/packages/core/src/sheets/worksheet.ts b/packages/core/src/sheets/worksheet.tsindex e4a1e917ef..6e3b6bdf8b 100644--- a/packages/core/src/sheets/worksheet.ts+++ b/packages/core/src/sheets/worksheet.ts@@ -581,10 +581,13 @@ export class Worksheet {} else if (dataMode === CellModeEnum.Intercepted) {cellData = this.getCell(row, col);} else if (dataMode === CellModeEnum.Both) {- cellData = this.getCellRaw(row, col);- const displayV = this.getCell(row, col)?.v;- if (isNotNullOrUndefined(displayV) && cellData) {- cellData.displayV = String(displayV);+ const cellDataRaw = this.getCellRaw(row, col);+ if (cellDataRaw) {+ cellData = { ...cellDataRaw };+ const displayV = this.getCell(row, col)?.v;+ if (isNotNullOrUndefined(displayV) && cellData) {+ cellData.displayV = String(displayV);+ }}}