0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 04:49:03 -05:00

Make the navigation async by default.

This leaves some time to eventloop to terminate other
async events before navigate.
This commit is contained in:
Andrey Antukh 2021-05-26 16:30:23 +02:00 committed by Alonso Torres
parent b2dc849e52
commit cad2b831ed

View file

@ -84,12 +84,13 @@
ptk/EffectEvent ptk/EffectEvent
(effect [_ state stream] (effect [_ state stream]
(let [router (:router state) (ts/asap
history (:history state) #(let [router (:router state)
path (resolve router id params qparams)] history (:history state)
(if ^boolean replace path (resolve router id params qparams)]
(bhistory/replace-token! history path) (if ^boolean replace
(bhistory/set-token! history path)))))) (bhistory/replace-token! history path)
(bhistory/set-token! history path)))))))
(defn nav (defn nav
([id] (nav id nil nil)) ([id] (nav id nil nil))