Skip to content

Commit

Permalink
fix: non-consecutive blocks move
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Jun 14, 2022
1 parent 6cd7b1a commit 3e0c4ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/frontend/modules/outliner/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,9 @@
top-level-blocks-ids (set (map :db/id top-level-blocks))
right-block (get-right-sibling (:db/id (last top-level-blocks)))]
(when (and right-block
(not (contains? top-level-blocks-ids (:db/id right-block))))
(not (contains? top-level-blocks-ids (:db/id right-block)))
(not= (:db/id (last top-level-blocks))
(:db/id (:block/left right-block))))
{:db/id (:db/id right-block)
:block/left (loop [block (:block/left right-block)]
(if (contains? top-level-blocks-ids (:db/id block))
Expand Down

0 comments on commit 3e0c4ba

Please sign in to comment.