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:
parent
468dcb05f9
commit
fedef396eb
1 changed files with 9 additions and 4 deletions
|
|
@ -32,8 +32,13 @@
|
||||||
(defn wrap-dynamic-nav [f]
|
(defn wrap-dynamic-nav [f]
|
||||||
(fn [& args]
|
(fn [& args]
|
||||||
(let [ret (apply f args)]
|
(let [ret (apply f args)]
|
||||||
(if (and (sequential? ret) (static-path? ret))
|
(cond (and (sequential? ret) (static-path? ret))
|
||||||
(i/comp-paths* ret)
|
(i/comp-paths* ret)
|
||||||
|
|
||||||
|
(and (sequential? ret) (= 1 (count ret)))
|
||||||
|
(first ret)
|
||||||
|
|
||||||
|
:else
|
||||||
ret
|
ret
|
||||||
))))
|
))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue