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: objectmatrix bug

jerrydba1feca8220
diff --git a/packages/core/src/Shared/ObjectMatrix.ts b/packages/core/src/Shared/ObjectMatrix.ts
index 6934ec0af3..614207d9b3 100644
--- a/packages/core/src/Shared/ObjectMatrix.ts
+++ b/packages/core/src/Shared/ObjectMatrix.ts
@@ -183,7 +183,7 @@ export class ObjectMatrix<T> {
insertColumns(columnIndex: number, columnData: ObjectMatrix<T>) {
const count = columnData.getRow(0)!.getLength();
- this._matrix.forEach((index, value) => {
+ this.forEach((index, value) => {
for (let i = columnIndex; i < columnIndex + count; i++) {
const data = columnData.getRow(index)?.get(i - columnIndex);
value.insert(i, columnData.getRow(index)?.get(i - columnIndex) as T);