|
@@ -592,9 +592,11 @@
|
|
|
;; same page, get the most top block before dragging
|
|
|
(let [match-ids (set (conj move-blocks target))]
|
|
|
(loop [[id & others] cached-ids]
|
|
|
- (if (contains? match-ids id)
|
|
|
- id
|
|
|
- (recur others))))))
|
|
|
+ (if id
|
|
|
+ (if (contains? match-ids id)
|
|
|
+ id
|
|
|
+ (recur others))
|
|
|
+ nil)))))
|
|
|
(let [insert? (contains? #{:insert-node :insert-nodes :save-and-insert-node} outliner-op)]
|
|
|
(some #(when (and (or (and insert? (not (contains? cached-ids-set %)))
|
|
|
true)
|