fix: Contents removed when switching graph

fixes https://github.com/logseq/db-test/issues/94
This commit is contained in:
Tienson Qin
2024-09-18 11:44:44 +08:00
parent 8ab4975041
commit 6a06911fee
3 changed files with 9 additions and 20 deletions

View File

@@ -606,7 +606,7 @@
(doseq [page pages]
(let [page (util/safe-page-name-sanity-lc page)
[db-id block-type] (if (= page "contents")
["contents" :contents]
[(or (:db/id (db/get-page page)) "contents") :contents]
[(:db/id (db/get-page page)) :page])]
(state/sidebar-add-block! current-repo db-id block-type)))
(reset! sidebar-inited? true))))