mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -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]
|
||||
(let [result (s/conform spec data)]
|
||||
(when (= result ::s/invalid)
|
||||
(throw (ex/error :type :validation
|
||||
:code :spec-validation
|
||||
:explain (with-out-str
|
||||
(expound/printer data))
|
||||
:data (::s/problems data))))
|
||||
(let [edata (s/explain-data spec data)]
|
||||
(throw (ex/error :type :validation
|
||||
:code :spec-validation
|
||||
:explain (with-out-str
|
||||
(expound/printer edata))
|
||||
:data (::s/problems edata)))))
|
||||
result))
|
||||
|
|
Loading…
Reference in a new issue