Skip to content

Commit ec02b0a

Browse files
authored
Merge pull request #267 from animalia/master
Fixes nested reasons being overwritten by outer spec's reason #171.
2 parents fae1726 + ae28029 commit ec02b0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/spec_tools/core.cljc

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@
460460
spec-reason (:reason this)
461461
with-reason (fn [problem]
462462
(cond-> problem
463-
spec-reason
463+
(and spec-reason (not (:reason problem)))
464464
(assoc :reason spec-reason)))]
465465
(if problems
466466
(map with-reason problems))))

0 commit comments

Comments
 (0)