fix(ui): incorrect order list number for the root block

This commit is contained in:
charlie
2023-04-21 09:49:06 +08:00
parent dcf870358c
commit c34a641647

View File

@@ -308,7 +308,8 @@
(let [idx (if prev-block
(count (order-sibling-list block)) 1)
order-parents-count (count (order-parent-list block))]
(if (odd? order-parents-count)
(if (or (zero? order-parents-count)
(odd? order-parents-count))
idx (nth (seq "abcdefghijklmnopqrstuvwxyz") (mod (dec idx) 26)))))))
(defn attach-order-list-state