mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
✨ Make check-fn completly lazy
This commit is contained in:
@@ -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)]
|
||||||
|
|||||||
Reference in New Issue
Block a user