From 586b02f67d84958e8e692fa52c6009d0bc3bafa8 Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Thu, 22 Mar 2018 18:57:53 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20based=20on=20Miikka=E2=80=99s=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/reitit-core/src/reitit/impl.cljc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/reitit-core/src/reitit/impl.cljc b/modules/reitit-core/src/reitit/impl.cljc index 9df30456..9795cf11 100644 --- a/modules/reitit-core/src/reitit/impl.cljc +++ b/modules/reitit-core/src/reitit/impl.cljc @@ -166,7 +166,7 @@ (some-> s #?(:clj (URLEncoder/encode "UTF-8") :cljs (js/encodeURIComponent)) - (.replace "+" "%20"))) + #?(:clj (.replace "+" "%20")))) (defn url-decode [s] (some-> s #?(:clj (URLDecoder/decode "UTF-8") @@ -201,9 +201,8 @@ (defn path-params "shallow transform of the path-param values into strings" [params] - (persistent! - (reduce-kv - (fn [m k v] - (assoc! m k (url-encode (into-string v)))) - (transient {}) - params))) + (reduce-kv + (fn [m k v] + (assoc m k (url-encode (into-string v)))) + {} + params))