0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -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
(effect [_ state stream]
(let [router (:router state)
history (:history state)
path (resolve router id params qparams)]
(if ^boolean replace
(bhistory/replace-token! history path)
(bhistory/set-token! history path))))))
(ts/asap
#(let [router (:router state)
history (:history state)
path (resolve router id params qparams)]
(if ^boolean replace
(bhistory/replace-token! history path)
(bhistory/set-token! history path)))))))
(defn nav
([id] (nav id nil nil))