From 3c4b0791fcb5a14178f180da30ee11637b2f756b Mon Sep 17 00:00:00 2001 From: hipitihop Date: Wed, 20 Jul 2016 17:16:01 +1000 Subject: [PATCH] correct use of list? to account for lazy seqs --- src/re_frame/fx.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/re_frame/fx.cljs b/src/re_frame/fx.cljs index 0c24a44..dd5dd4e 100644 --- a/src/re_frame/fx.cljs +++ b/src/re_frame/fx.cljs @@ -41,8 +41,8 @@ "There are cases where eitherone event is to be dipatch " [effect] (cond - (list? effect) (dorun (map dispatch effect)) (vector? effect) (dispatch effect) + (seq? effect) (dorun (map dispatch effect)) :else (console :error "re-frame: expected :dispatch effect to be a list or vector, but got: " effect))) ;; Example: @@ -88,14 +88,14 @@ (fn [val] (cond (map? val) (process-one-entry val) - (list? val) (doall (map process-one-entry val))) ;; XXX add else + (seq? val) (doall (map process-one-entry val))) ;; XXX add else ))) (register :deregister-event-handler (fn [val] - (if (list? val) + (if (sequential? val) (doall (map re-frame.events/clear-handler! val)) (re-frame.events/clear-handler! val))))