mirror of
https://github.com/status-im/reagent.git
synced 2025-01-14 22:04:40 +00:00
cleanup
This commit is contained in:
parent
680b19a772
commit
440956c9a9
@ -62,7 +62,7 @@
|
|||||||
(assoc state :page-name v1))
|
(assoc state :page-name v1))
|
||||||
:goto-page (do
|
:goto-page (do
|
||||||
(assert (string? v1))
|
(assert (string? v1))
|
||||||
(if r/is-client
|
(if history
|
||||||
(do (.setToken history v1)
|
(do (.setToken history v1)
|
||||||
(r/next-tick #(set! js/document.body.scrollTop 0))
|
(r/next-tick #(set! js/document.body.scrollTop 0))
|
||||||
state)
|
state)
|
||||||
@ -89,7 +89,7 @@
|
|||||||
(defn init-history [page]
|
(defn init-history [page]
|
||||||
(when-not history
|
(when-not history
|
||||||
(let [html5 (and page
|
(let [html5 (and page
|
||||||
(.isSupported Html5History)
|
(Html5History.isSupported)
|
||||||
(#{"http:" "https:"} js/location.protocol))]
|
(#{"http:" "https:"} js/location.protocol))]
|
||||||
(doto (set! history
|
(doto (set! history
|
||||||
(if html5
|
(if html5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user