mirror of
https://github.com/penpot/penpot.git
synced 2025-02-15 11:38:24 -05:00
🐛 Fix text content validation
This commit is contained in:
parent
53cee87701
commit
74dd4f1ff8
2 changed files with 3 additions and 4 deletions
|
@ -246,9 +246,8 @@
|
||||||
(let [shape-old (dm/get-in data-old [:pages-index page-id :objects id])
|
(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])]
|
shape-new (dm/get-in data-new [:pages-index page-id :objects id])]
|
||||||
|
|
||||||
;; If object has changed verify is correct
|
;; If object has changed or is new verify is correct
|
||||||
(when (and (some? shape-old)
|
(when (and (some? shape-new)
|
||||||
(some? shape-new)
|
|
||||||
(not= shape-old shape-new))
|
(not= shape-old shape-new))
|
||||||
(dm/verify! (cts/shape? shape-new)))))]
|
(dm/verify! (cts/shape? shape-new)))))]
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,7 @@
|
||||||
[:map {:title "TextAttrs"}
|
[:map {:title "TextAttrs"}
|
||||||
[:id ::sm/uuid]
|
[:id ::sm/uuid]
|
||||||
[:type [:= :text]]
|
[:type [:= :text]]
|
||||||
[:content ::ctsx/content]])
|
[:content {:optional true} [:maybe ::ctsx/content]]])
|
||||||
|
|
||||||
(sm/def! ::shape
|
(sm/def! ::shape
|
||||||
[:multi {:dispatch :type :title "Shape"}
|
[:multi {:dispatch :type :title "Shape"}
|
||||||
|
|
Loading…
Add table
Reference in a new issue