From aa31afdf0c3f19086b0f803095f8ba0e6d5dad16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BA=91=E9=A3=9E?= Date: Mon, 9 May 2022 18:26:52 +0800 Subject: [PATCH] fix:get position error when at selection boundary --- src/editor/core/position/Position.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/core/position/Position.ts b/src/editor/core/position/Position.ts index be0c423..83ab088 100644 --- a/src/editor/core/position/Position.ts +++ b/src/editor/core/position/Position.ts @@ -189,7 +189,7 @@ export class Position { } return { index: curPositionIndex, - isControl: elementList[curPositionIndex].type === ElementType.CONTROL + isControl: elementList[curPositionIndex]?.type === ElementType.CONTROL } }