Skip to content

Commit 51d0cf5

Browse files
committed
fix: ordered list number on Library page
1 parent 7b46076 commit 51d0cf5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/frontend/handler/block.cljs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,13 @@
7777
(= type order-list-type)))
7878
prev-block-fn #(some-> (db/entity (:db/id %)) ldb/get-left-sibling)
7979
prev-block (prev-block-fn block)]
80-
(letfn [(page-fn? [b] (some-> b :block/name some?))
81-
(order-sibling-list [b]
80+
(letfn [(order-sibling-list [b]
8281
(lazy-seq
83-
(when (and (not (page-fn? b)) (order-block-fn? b))
82+
(when (order-block-fn? b)
8483
(cons b (order-sibling-list (prev-block-fn b))))))
8584
(order-parent-list [b]
8685
(lazy-seq
87-
(when (and (not (page-fn? b)) (order-block-fn? b))
86+
(when (order-block-fn? b)
8887
(cons b (order-parent-list (db-model/get-block-parent (:block/uuid b)))))))]
8988
(let [idx (if prev-block
9089
(count (order-sibling-list block)) 1)

0 commit comments

Comments
 (0)