Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/main/logseq/api.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,13 @@
(fn [name ^js properties ^js opts]
(some-> (if-let [page (db-model/get-page name)]
page
(let [properties (bean/->clj properties)
;; NOTE: `properties` is stored verbatim as the page entity's
;; :block/properties (see frontend.handler.page/create!), so it must be a
;; real persistent map. `bean/->clj` returns a lazy cljs-bean view, which
;; datascript-transit has no write handler for -- once one is in the DB,
;; every later `frontend.db/persist!` throws "Cannot write Bean" and the
;; graph can never be saved again. `js->clj` converts deeply and eagerly.
(let [properties (js->clj properties :keywordize-keys true)
{:keys [redirect createFirstBlock format journal]} (bean/->clj opts)
name (page-handler/create!
name
Expand Down
Loading