Skip to content

Commit 5835396

Browse files
committed
fix: compute position boundary error
1 parent 9e31b41 commit 5835396

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/editor/core/position/Position.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ export class Position {
303303
let startRowIndex = 0
304304
for (let i = 0; i < pageRowList.length; i++) {
305305
const rowList = pageRowList[i]
306-
const startIndex = rowList[0]?.startIndex
306+
if (!rowList?.length) continue
307+
const startIndex = rowList[0].startIndex
307308
this.computePageRowPosition({
308309
positionList: this.positionList,
309310
rowList,

0 commit comments

Comments
 (0)