Skip to content

Commit 70c0b95

Browse files
committed
precise notion of "lazy" being whether to deref child at schema creation
1 parent a0bcc56 commit 70c0b95

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/malli/core.cljc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,10 +2089,8 @@
20892089
(let [child (delay (or (mr/-schema (-registry options) ref)
20902090
(when-not allow-invalid-refs
20912091
(-fail! ::invalid-ref {:type :ref, :ref ref}))))
2092-
rf (if lazy
2093-
(-memoize (fn [] (schema @child options)))
2094-
(let [s @child]
2095-
(-memoize (fn [] (schema s options)))))
2092+
_ (when-not lazy @child)
2093+
rf (-memoize (fn [] (schema @child options)))
20962094
children (vec children)
20972095
form (delay (-simple-form parent properties children identity options))
20982096
cache (-create-cache options)

0 commit comments

Comments
 (0)