Browse Source

fix: empty content check if inserting with `replace-empty-target?`

Tienson Qin 3 years ago
parent
commit
8f1f95741f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/frontend/modules/outliner/core.cljs

+ 2 - 1
src/main/frontend/modules/outliner/core.cljs

@@ -448,7 +448,8 @@
         sibling? (if (page-block? target-block') false sibling?)
         move? (contains? #{:move-blocks :move-blocks-up-down :indent-outdent-blocks} outliner-op)
         keep-uuid? (if move? true keep-uuid?)
-        replace-empty-target? (if (some? replace-empty-target?)
+        replace-empty-target? (if (and (some? replace-empty-target?)
+                                       (string/blank? (:block/content target-block')))
                                 replace-empty-target?
                                 (and sibling?
                                      (string/blank? (:block/content target-block'))