diff --git a/src/re_frame/middleware.cljs b/src/re_frame/middleware.cljs index 67dc121..0ce0085 100644 --- a/src/re_frame/middleware.cljs +++ b/src/re_frame/middleware.cljs @@ -114,9 +114,9 @@ ^{:re-frame-factory-name "path"} (fn path [& args] - (let [path (flatten args) - _ (if (empty? path) - (error "re-frame: \"path\" middleware given no params."))] + (let [path (flatten args)] + (when (empty? path) + (error "re-frame: \"path\" middleware given no params.")) (fn path-middleware [handler] (fn path-handler