From f67adcd4d54aec19a38ce3cd59517fa55a423dc5 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Wed, 15 Nov 2023 20:01:24 +0800 Subject: [PATCH] fix: cut paste blocks --- src/main/frontend/modules/outliner/core.cljs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/frontend/modules/outliner/core.cljs b/src/main/frontend/modules/outliner/core.cljs index 6872b38f4b..dd95d56bc9 100644 --- a/src/main/frontend/modules/outliner/core.cljs +++ b/src/main/frontend/modules/outliner/core.cljs @@ -416,13 +416,12 @@ (defn- assign-temp-id [blocks replace-empty-target? target-block] (map-indexed (fn [idx block] + ;; TODO: block uuid changed, this could be a problem for rtc (let [replacing-block? (and replace-empty-target? (zero? idx)) db-id (if replacing-block? (:db/id target-block) (dec (- idx)))] - (cond-> (assoc block :db/id db-id) - (and replacing-block? (:block/uuid target-block)) - (assoc :block/uuid (:block/uuid target-block))))) blocks)) + (assoc block :db/id db-id))) blocks)) (defn- find-outdented-block-prev-hop [outdented-block blocks]