From 06b35fa3e3fc57b6824ebf8ca39bf38d99a13732 Mon Sep 17 00:00:00 2001 From: Isaac Johnston Date: Sun, 19 Dec 2021 15:00:56 +1300 Subject: [PATCH] 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. --- src/re_frame/fx.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/re_frame/fx.cljc b/src/re_frame/fx.cljc index cf40b3374..9a5f99b22 100644 --- a/src/re_frame/fx.cljc +++ b/src/re_frame/fx.cljc @@ -108,7 +108,7 @@ :fx (fn [seq-of-effects] (if-not (sequential? seq-of-effects) - (console :error "re-frame: \":fx\" effect expects a seq, but was given " (type seq-of-effects)) + (console :warn "re-frame: \":fx\" effect expects a seq, but was given " (type seq-of-effects)) (doseq [[effect-key effect-value] (remove nil? seq-of-effects)] (when (= :db effect-key) (console :warn "re-frame: \":fx\" effect should not contain a :db effect"))