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,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
|
||||
|
|
|
|||
Loading…
Reference in a new issue