fix root id of :init-root-fx (#15228)
This commit is contained in:
parent
7d9709ee67
commit
78682b823b
|
@ -189,10 +189,11 @@
|
||||||
(re-frame/reg-fx
|
(re-frame/reg-fx
|
||||||
:init-root-fx
|
:init-root-fx
|
||||||
(fn [new-root-id]
|
(fn [new-root-id]
|
||||||
|
(let [root (get (roots/roots) new-root-id)]
|
||||||
(log/debug :init-root-fx new-root-id)
|
(log/debug :init-root-fx new-root-id)
|
||||||
(dismiss-all-modals)
|
(dismiss-all-modals)
|
||||||
(reset! state/root-id new-root-id)
|
(reset! state/root-id (or (get-in root [:root :stack :id]) new-root-id))
|
||||||
(navigation/set-root (get (roots/roots) new-root-id))))
|
(navigation/set-root root))))
|
||||||
|
|
||||||
(rf/defn set-multiaccount-root
|
(rf/defn set-multiaccount-root
|
||||||
{:events [::set-multiaccount-root]}
|
{:events [::set-multiaccount-root]}
|
||||||
|
|
Loading…
Reference in New Issue