mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 09:26:28 +00:00
Handle more block/name lookup refs
This commit is contained in:
@@ -228,7 +228,7 @@
|
||||
(let [page (:page default-home)
|
||||
page (when (and (string? page)
|
||||
(not (string/blank? page)))
|
||||
(db/entity [:block/name (util/safe-page-name-sanity-lc page)]))]
|
||||
(db/entity (ldb/get-first-page-by-name (db/get-db) page)))]
|
||||
(if page
|
||||
default-home
|
||||
(dissoc default-home :page)))))
|
||||
@@ -655,7 +655,7 @@
|
||||
(let [page (util/safe-page-name-sanity-lc page)
|
||||
[db-id block-type] (if (= page "contents")
|
||||
["contents" :contents]
|
||||
[(:db/id (db/pull [:block/name page])) :page])]
|
||||
[(ldb/get-first-page-by-name (db/get-db) page) :page])]
|
||||
(state/sidebar-add-block! current-repo db-id block-type)))
|
||||
(reset! sidebar-inited? true))))
|
||||
(when (state/mobile?)
|
||||
|
||||
Reference in New Issue
Block a user