From a9fc226a39c3ef78d217fe7435b4b463c5879eac Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Sat, 4 Nov 2023 10:22:23 +0800 Subject: [PATCH] fix: shrink control range boundary error #305 --- src/editor/core/range/RangeManager.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/editor/core/range/RangeManager.ts b/src/editor/core/range/RangeManager.ts index 3c093da..5ade74c 100644 --- a/src/editor/core/range/RangeManager.ts +++ b/src/editor/core/range/RangeManager.ts @@ -416,6 +416,7 @@ export class RangeManager { const elementList = this.draw.getElementList() const range = this.getRange() const { startIndex, endIndex } = range + if (!~startIndex && !~endIndex) return const startElement = elementList[startIndex] const endElement = elementList[endIndex] if (startIndex === endIndex) {