mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -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])
|
||||
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)))))]
|
||||
|
||||
|
|
|
@ -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"}
|
||||
|
|
Loading…
Add table
Reference in a new issue