mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 01:16:27 +00:00
fix: db/entity with interger id is not nil with non-exist block (#7723)
fix: returns nil for db/entity if the entity doesn't exist Co-authored-by: Junyi Du <junyidu.cn@gmail.com>
This commit is contained in:
@@ -174,7 +174,7 @@
|
||||
(apply d/q query db inputs))
|
||||
|
||||
kv?
|
||||
(d/entity db (last k))
|
||||
(db-utils/entity db (last k))
|
||||
|
||||
(seq inputs)
|
||||
(apply d/q query db inputs)
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
(defn- get-block-parents
|
||||
[db id]
|
||||
(let [get-parent (fn [id] (:db/id (:block/parent (d/entity db id))))]
|
||||
(let [get-parent (fn [id] (:db/id (:block/parent (db-utils/entity db id))))]
|
||||
(loop [result [id]
|
||||
id id]
|
||||
(if-let [parent (get-parent id)]
|
||||
|
||||
Reference in New Issue
Block a user