mirror of
https://github.com/penpot/penpot.git
synced 2026-09-10 22:19:19 +00:00
✨ Make check-fn completly lazy
This commit is contained in:
parent
d04fdb5fbd
commit
a9733c792d
@ -284,9 +284,9 @@
|
|||||||
(defn check-fn
|
(defn check-fn
|
||||||
"Create a predefined check function"
|
"Create a predefined check function"
|
||||||
[s & {:keys [hint type code]}]
|
[s & {:keys [hint type code]}]
|
||||||
(let [s (schema s)
|
(let [s (delay (schema s))
|
||||||
validator* (delay (m/validator s))
|
validator* (delay (m/validator @s))
|
||||||
explainer* (delay (m/explainer s))
|
explainer* (delay (m/explainer @s))
|
||||||
hint (or ^boolean hint "check error")
|
hint (or ^boolean hint "check error")
|
||||||
type (or ^boolean type :assertion)
|
type (or ^boolean type :assertion)
|
||||||
code (or ^boolean code :data-validation)]
|
code (or ^boolean code :data-validation)]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user