mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
🐛 Fix conform
function on uxbox.common.spec.
This commit is contained in:
parent
74f1f93732
commit
1cc64ae4d2
1 changed files with 6 additions and 5 deletions
|
@ -126,9 +126,10 @@
|
||||||
[spec data]
|
[spec data]
|
||||||
(let [result (s/conform spec data)]
|
(let [result (s/conform spec data)]
|
||||||
(when (= result ::s/invalid)
|
(when (= result ::s/invalid)
|
||||||
(throw (ex/error :type :validation
|
(let [edata (s/explain-data spec data)]
|
||||||
:code :spec-validation
|
(throw (ex/error :type :validation
|
||||||
:explain (with-out-str
|
:code :spec-validation
|
||||||
(expound/printer data))
|
:explain (with-out-str
|
||||||
:data (::s/problems data))))
|
(expound/printer edata))
|
||||||
|
:data (::s/problems edata)))))
|
||||||
result))
|
result))
|
||||||
|
|
Loading…
Add table
Reference in a new issue