Преглед изворни кода

fix: check blocks ids when inserting only if it's not the move op

Tienson Qin пре 3 година
родитељ
комит
28dfe9759a
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/main/frontend/modules/outliner/core.cljs

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

@@ -479,7 +479,8 @@
             next (if sibling?
                    (tree/-get-right target-node)
                    (tree/-get-down target-node))
-            next-tx (when (and next (not (contains? (set (map :db/id blocks)) (:db/id (:data next)))))
+            next-tx (when (and next
+                               (if move? (not (contains? (set (map :db/id blocks)) (:db/id (:data next)))) true))
                       (when-let [left (last (filter (fn [b] (= 1 (:block/level b))) tx))]
                         [{:block/uuid (tree/-get-id next)
                           :block/left (:db/id left)}]))