From ac8a7b5cd207f21f2f34281930567eae20e5f11c Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Fri, 8 Sep 2017 08:28:15 +0300 Subject: [PATCH] Don't push :path-params if there aren't any --- src/reitit/ring.cljc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reitit/ring.cljc b/src/reitit/ring.cljc index 9a6b2019..9fe6aec6 100644 --- a/src/reitit/ring.cljc +++ b/src/reitit/ring.cljc @@ -28,7 +28,7 @@ (if handler (handler (cond-> (impl/fast-assoc request ::match match) - params (impl/fast-assoc :path-params params))))))) + (seq params) (impl/fast-assoc :path-params params))))))) ([request respond raise] (if-let [match (reitit/match-by-path router (:uri request))] (let [method (:request-method request :any) @@ -39,7 +39,7 @@ (if handler (handler (cond-> (impl/fast-assoc request ::match match) - params (impl/fast-assoc :path-params params)) + (seq params) (impl/fast-assoc :path-params params)) respond raise)))))) {::router router}))