handle nil with IntoString

This commit is contained in:
Tommi Reiman 2018-06-14 17:50:24 +03:00
parent 771128c281
commit 26be209d3a
2 changed files with 9 additions and 4 deletions

View file

@ -196,10 +196,13 @@
#?(:clj Object #?(:clj Object
:cljs object) :cljs object)
(into-string [this] (str this))) (into-string [this] (str this))
nil
(into-string [this]))
(defn path-params (defn path-params
"shallow transform of the path-param values into strings" "shallow transform of the path parameters values into strings"
[params] [params]
(reduce-kv (reduce-kv
(fn [m k v] (fn [m k v]

View file

@ -33,7 +33,8 @@
:s "kikka" :s "kikka"
:u "c2541900-17a7-4353-9024-db8ac258ba4e" :u "c2541900-17a7-4353-9024-db8ac258ba4e"
:k "kikka" :k "kikka"
:qk "reitit.impl-test%2Fkikka"} :qk "reitit.impl-test%2Fkikka"
:nil nil}
(impl/path-params {:n 1 (impl/path-params {:n 1
:n1 -1 :n1 -1
:n2 (long 1) :n2 (long 1)
@ -45,4 +46,5 @@
:s "kikka" :s "kikka"
:u #uuid "c2541900-17a7-4353-9024-db8ac258ba4e" :u #uuid "c2541900-17a7-4353-9024-db8ac258ba4e"
:k :kikka :k :kikka
:qk ::kikka})))) :qk ::kikka
:nil nil}))))