refactor: update :block/type to cardinality one instead of many

This commit is contained in:
Tienson Qin
2024-07-31 19:35:26 +08:00
parent 1cf4ba95cc
commit d26e620a82
47 changed files with 244 additions and 262 deletions

View File

@@ -1311,7 +1311,7 @@
[block value opts]
(let [entity (db/entity [:block/uuid (:block/uuid block)])]
(when (and (:db/id entity)
(not (contains? (:block/type entity) "property")))
(not (= (:block/type entity) "property")))
(let [value (string/trim value)]
;; FIXME: somehow frontend.components.editor's will-unmount event will loop forever
;; maybe we shouldn't save the block/file in "will-unmount" event?