From fc9da0d13a5897479ee56342aeb40d952daa160a Mon Sep 17 00:00:00 2001 From: Ducky Date: Thu, 16 Jul 2015 17:25:54 +0100 Subject: [PATCH] Minor code cleanup --- src/re_frame/middleware.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/re_frame/middleware.cljs b/src/re_frame/middleware.cljs index ed9b4d9..a0055f3 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