diff --git a/common/src/app/common/pages/changes.cljc b/common/src/app/common/pages/changes.cljc index 78bb492b8..97be5e91b 100644 --- a/common/src/app/common/pages/changes.cljc +++ b/common/src/app/common/pages/changes.cljc @@ -246,9 +246,8 @@ (let [shape-old (dm/get-in data-old [:pages-index page-id :objects id]) shape-new (dm/get-in data-new [:pages-index page-id :objects id])] - ;; If object has changed verify is correct - (when (and (some? shape-old) - (some? shape-new) + ;; If object has changed or is new verify is correct + (when (and (some? shape-new) (not= shape-old shape-new)) (dm/verify! (cts/shape? shape-new)))))] diff --git a/common/src/app/common/types/shape.cljc b/common/src/app/common/types/shape.cljc index 89c229959..4b5703acd 100644 --- a/common/src/app/common/types/shape.cljc +++ b/common/src/app/common/types/shape.cljc @@ -225,7 +225,7 @@ [:map {:title "TextAttrs"} [:id ::sm/uuid] [:type [:= :text]] - [:content ::ctsx/content]]) + [:content {:optional true} [:maybe ::ctsx/content]]]) (sm/def! ::shape [:multi {:dispatch :type :title "Shape"}