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(sheet): set selection should ensure the selection is not null (#3497)
VicKun7b89f270d515
diff --git a/packages/sheets/src/services/selections/selection-manager.service.ts b/packages/sheets/src/services/selections/selection-manager.service.tsindex d7751c358c..8d3513a08c 100644--- a/packages/sheets/src/services/selections/selection-manager.service.ts+++ b/packages/sheets/src/services/selections/selection-manager.service.ts@@ -129,7 +129,7 @@ export class SheetsSelectionsService extends RxDisposable {}const { unitId, sheetId } = current;- this._ensureWorkbookSelection(unitId).setSelections(sheetId, unitIdOrSelections, worksheetIdOrType as SelectionMoveType ?? SelectionMoveType.MOVE_END);+ this._ensureWorkbookSelection(unitId).setSelections(sheetId, unitIdOrSelections ?? selectionDatas, worksheetIdOrType as SelectionMoveType ?? SelectionMoveType.MOVE_END);}clearCurrentSelections(): void {