mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 11:26:26 +00:00
fix: use page uuid for graph url in db graph
We still need to use page name for file graph because pages in file graph don't have persistent ids.
This commit is contained in:
@@ -10,6 +10,12 @@
|
||||
(or (:block/title (db/get-page (state/get-current-page)))
|
||||
(get-in (first (state/get-editor-args)) [:block :block/page :block/title])))
|
||||
|
||||
(defn get-current-page-uuid
|
||||
"Fetch the current page's uuid with same approach as get-current-page-id"
|
||||
[]
|
||||
(or (:block/uuid (db/get-page (state/get-current-page)))
|
||||
(get-in (first (state/get-editor-args)) [:block :block/page :block/uuid])))
|
||||
|
||||
(defn get-current-page-id
|
||||
"Fetches the current page id. Looks up page based on latest route and if
|
||||
nothing is found, gets page of last edited block"
|
||||
|
||||
Reference in New Issue
Block a user