Skip to content

Commit 06b35fa

Browse files
committed
Change nil :fx value to warning instead of error
Middle ground fix for #737. I don't think silence on nil is OK esp in the context of this error message being in place for some time. However it needs to be changed to a warning so that users are not misled into thinking that nil is unsupported - if you intended it, then it is fine.
1 parent 7feb729 commit 06b35fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/re_frame/fx.cljc

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
:fx
109109
(fn [seq-of-effects]
110110
(if-not (sequential? seq-of-effects)
111-
(console :error "re-frame: \":fx\" effect expects a seq, but was given " (type seq-of-effects))
111+
(console :warn "re-frame: \":fx\" effect expects a seq, but was given " (type seq-of-effects))
112112
(doseq [[effect-key effect-value] (remove nil? seq-of-effects)]
113113
(when (= :db effect-key)
114114
(console :warn "re-frame: \":fx\" effect should not contain a :db effect"))

0 commit comments

Comments
 (0)