Skip to content

Commit

Permalink
tweak: throw exception when not given a compatible continuation
Browse files Browse the repository at this point in the history
  • Loading branch information
seanstrom committed Jun 11, 2024
1 parent 04e4bd6 commit e7bc815
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/re_frame.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,7 @@
[continuation & args]
(cond
(vector? continuation) (dispatch (into continuation args))
(fn? continuation) (apply continuation args)))
(fn? continuation) (apply continuation args)
:else (throw (ex-info
(str "Unsupported continuation: " (type->str continuation))
{:hint "Make sure to pass a vector or function"}))))

0 comments on commit e7bc815

Please sign in to comment.