change dynamic navs to return single navigator instead of sequence of one nav, helps inline compiler when a nav takes a parameterized navs as input

This commit is contained in:
nathanmarz 2017-03-22 13:30:35 -04:00
parent 468dcb05f9
commit fedef396eb

View file

@ -32,10 +32,15 @@
(defn wrap-dynamic-nav [f]
(fn [& args]
(let [ret (apply f args)]
(if (and (sequential? ret) (static-path? ret))
(i/comp-paths* ret)
ret
))))
(cond (and (sequential? ret) (static-path? ret))
(i/comp-paths* ret)
(and (sequential? ret) (= 1 (count ret)))
(first ret)
:else
ret
))))
#?(:clj
(do