mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
✨ Add less verbose shape validation
This commit is contained in:
parent
4ad4057878
commit
749c369080
2 changed files with 4 additions and 1 deletions
|
@ -371,7 +371,7 @@
|
|||
(not= shape-old shape-new))
|
||||
(dm/verify!
|
||||
"expected valid shape"
|
||||
(and (cts/check-shape! shape-new)
|
||||
(and (cts/valid-shape? shape-new)
|
||||
(cts/shape? shape-new))))))]
|
||||
|
||||
(->> (into #{} (map :page-id) items)
|
||||
|
|
|
@ -354,6 +354,9 @@
|
|||
(def check-shape!
|
||||
(sm/check-fn schema:shape))
|
||||
|
||||
(def valid-shape?
|
||||
(sm/lazy-validator schema:shape))
|
||||
|
||||
(defn has-images?
|
||||
[{:keys [fills strokes]}]
|
||||
(or (some :fill-image fills)
|
||||
|
|
Loading…
Add table
Reference in a new issue