From 522d2dc465b1a8c0cfddeceda225f34220fa1435 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 10 Aug 2022 11:28:57 +0800 Subject: [PATCH] :bug: --- app/src/util/backForward.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/util/backForward.ts b/app/src/util/backForward.ts index a34ef4108..4bf99c63f 100644 --- a/app/src/util/backForward.ts +++ b/app/src/util/backForward.ts @@ -254,7 +254,7 @@ export const pushBack = (protyle: IProtyle, range?: Range, blockElement?: Elemen if (!protyle.model) { return; } - if (!blockElement) { + if (!blockElement && range) { blockElement = hasClosestBlock(range.startContainer) as Element; } if (!blockElement) {