fix: render error when row element is empty #420

This commit is contained in:
Hufe921
2024-01-22 21:20:40 +08:00
parent b486d35c1a
commit 8999f283bb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1833,7 +1833,7 @@ export class Draw {
// 控件高亮 // 控件高亮
this.control.renderHighlightList(ctx, pageNo) this.control.renderHighlightList(ctx, pageNo)
// 渲染元素 // 渲染元素
const index = rowList[0].startIndex const index = rowList[0]?.startIndex
this.drawRow(ctx, { this.drawRow(ctx, {
elementList, elementList,
positionList, positionList,
+1 -1
View File
@@ -229,7 +229,7 @@ export class Position {
let startRowIndex = 0 let startRowIndex = 0
for (let i = 0; i < pageRowList.length; i++) { for (let i = 0; i < pageRowList.length; i++) {
const rowList = pageRowList[i] const rowList = pageRowList[i]
const startIndex = rowList[0].startIndex const startIndex = rowList[0]?.startIndex
this.computePageRowPosition({ this.computePageRowPosition({
positionList: this.positionList, positionList: this.positionList,
rowList, rowList,