fix: add missing tx condition

This commit is contained in:
Weihua Lu
2021-07-27 22:07:56 +08:00
parent 0825e8ea59
commit 1241ce6dfe
2 changed files with 16 additions and 0 deletions

View File

@@ -690,6 +690,19 @@
(when (db/page-empty? (state/get-current-repo) (:db/id page))
(api-insert-new-block! "" {:page page-name})))))
(defn properties-block
[properties format page]
(let [content (property/insert-properties format "" properties)]
{:block/pre-block? true
:block/uuid (db/new-block-id)
:block/properties properties
:block/left page
:block/format format
:block/content content
:block/parent page
:block/unordered true
:block/page page}))
(defn default-properties-block
([title format page]
(default-properties-block title format page {}))