if -> when

This commit is contained in:
Tommi Reiman 2018-06-06 10:33:58 +03:00
parent b2c0b2fdfa
commit f2d3d0a125

View file

@ -39,7 +39,7 @@
(walk-one [pacc macc routes] (walk-one [pacc macc routes]
(if (vector? (first routes)) (if (vector? (first routes))
(walk-many pacc macc routes) (walk-many pacc macc routes)
(if (string? (first routes)) (when (string? (first routes))
(let [[path & [maybe-arg :as args]] routes (let [[path & [maybe-arg :as args]] routes
[data childs] (if (or (vector? maybe-arg) (nil? maybe-arg)) [data childs] (if (or (vector? maybe-arg) (nil? maybe-arg))
[{} args] [{} args]