Skip to content

Commit

Permalink
Change nil :fx value to warning instead of error
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
superstructor committed Dec 19, 2021
1 parent 7feb729 commit 06b35fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/re_frame/fx.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 06b35fa

Please sign in to comment.