Skip to content

Commit ff0b11c

Browse files
henriklundahldnolen
authored andcommitted
CLJS-1935: When calling cljs.spec/valid?, subsequent predicates of cljs.spec/and are evaluated even when early predicate is unsatisfied
Fix that value is used instead of conformed value when checking for invalid? in cljs.spec/and with more than 3 specs.
1 parent 9068898 commit ff0b11c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/cljs/cljs/spec.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@
723723
(loop [ret x i 0]
724724
(if (< i (count specs))
725725
(let [nret (conform* (specs i) ret)]
726-
(if (invalid? ret)
726+
(if (invalid? nret)
727727
::invalid
728728
;;propagate conformed values
729729
(recur nret (inc i))))

0 commit comments

Comments
 (0)