diff --git a/src/editor/core/draw/Draw.ts b/src/editor/core/draw/Draw.ts index ea3300f..c4c79fb 100644 --- a/src/editor/core/draw/Draw.ts +++ b/src/editor/core/draw/Draw.ts @@ -1833,7 +1833,7 @@ export class Draw { // 控件高亮 this.control.renderHighlightList(ctx, pageNo) // 渲染元素 - const index = rowList[0].startIndex + const index = rowList[0]?.startIndex this.drawRow(ctx, { elementList, positionList, diff --git a/src/editor/core/position/Position.ts b/src/editor/core/position/Position.ts index 02a8cd2..9d72436 100644 --- a/src/editor/core/position/Position.ts +++ b/src/editor/core/position/Position.ts @@ -229,7 +229,7 @@ export class Position { let startRowIndex = 0 for (let i = 0; i < pageRowList.length; i++) { const rowList = pageRowList[i] - const startIndex = rowList[0].startIndex + const startIndex = rowList[0]?.startIndex this.computePageRowPosition({ positionList: this.positionList, rowList,