mirror of
https://github.com/logseq/logseq.git
synced 2026-05-26 13:44:13 +00:00
fix: prefer block template if there're other page templates with the
same name
This commit is contained in:
@@ -1321,7 +1321,7 @@
|
||||
[name]
|
||||
(when (string? name)
|
||||
(->> (d/q
|
||||
'[:find (pull ?b [*])
|
||||
'[:find [(pull ?b [*]) ...]
|
||||
:in $ ?name
|
||||
:where
|
||||
[?b :block/properties ?p]
|
||||
@@ -1329,7 +1329,8 @@
|
||||
[(= ?t ?name)]]
|
||||
(conn/get-db)
|
||||
name)
|
||||
ffirst)))
|
||||
(sort-by :block/name)
|
||||
(first))))
|
||||
|
||||
(defonce blocks-count-cache (atom nil))
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
txs (map (fn [m] (if (map? m)
|
||||
(dissoc m
|
||||
:block/children :block/meta :block/top? :block/bottom? :block/anchor
|
||||
:block/title :block/body :block/level :block/container)
|
||||
:block/title :block/body :block/level :block/container :db/other-tx)
|
||||
m)) txs)]
|
||||
(when (and (seq txs)
|
||||
(not (:skip-transact? opts)))
|
||||
|
||||
Reference in New Issue
Block a user