0
Fork 0
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:
Andrey Antukh 2024-09-09 12:23:33 +02:00 committed by Alonso Torres
parent 4ad4057878
commit 749c369080
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -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)