Skip to content

Commit 7c9941a

Browse files
committed
add check to -reducing
1 parent 8cb2c11 commit 7c9941a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/malli/util.cljc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@
379379

380380
(defn -reducing [f]
381381
(fn [_ children options]
382+
(when (empty? children)
383+
(m/-fail! ::reducing-children-must-be-non-empty))
382384
(let [[first & rest :as children] (mapv #(m/schema % options) children)]
383385
[children (mapv m/form children) (delay (reduce #(f %1 %2 options) first rest))])))
384386

0 commit comments

Comments
 (0)