Vanessa 3 年 前
コミット
522d2dc465
1 ファイル変更1 行追加1 行削除
  1. 1 1
      app/src/util/backForward.ts

+ 1 - 1
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) {