Skip to content

Commit 2eab70b

Browse files
Mike Thompsonclaude
andcommitted
Fix unreachable code warning in validate-inputs
The doseq macro expands into a loop with recur, so a throw in the body makes the continuation unreachable. Replace with some + throw to avoid the Closure Compiler advanced-compilation warning. Fixes #827 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 71de219 commit 2eab70b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/re_frame/flow/alpha.cljc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@
6060
flows))
6161

6262
(defn validate-inputs [{:keys [inputs]}]
63-
(doseq [[_ input] inputs
64-
:when (not ((some-fn db-path? flow<-?) input))]
63+
(when (some (fn [[_ input]]
64+
(not ((some-fn db-path? flow<-?) input)))
65+
inputs)
6566
(throw (#?(:clj Exception. :cljs js/Error.) "bad input"))))
6667

6768
(defn warn-stale-dependencies [flows new-flow]

0 commit comments

Comments
 (0)