mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 19:28:12 +00:00
🐛 Fix conform function on uxbox.common.spec.
This commit is contained in:
parent
74f1f93732
commit
1cc64ae4d2
@ -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…
x
Reference in New Issue
Block a user