From 28dfe9759a0f54cb4e41c43533e8e9a8e7d1ac34 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Mon, 6 Jun 2022 22:34:14 +0800 Subject: [PATCH] fix: check blocks ids when inserting only if it's not the move op --- src/main/frontend/modules/outliner/core.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/modules/outliner/core.cljs b/src/main/frontend/modules/outliner/core.cljs index 93d1de896b..be31ba23cf 100644 --- a/src/main/frontend/modules/outliner/core.cljs +++ b/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)}]))