Skip to content

Commit

Permalink
Add push-state! fn for backwards compatibility with 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wavejumper committed May 15, 2015
1 parent 6d12d48 commit f2ef0c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pushy/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,12 @@
"Returns whether Html5History is supported"
([] (supported? js/window))
([window] (.isSupported Html5History window)))

;; Backwards compatibility with pushy <= 0.2.2
(defn push-state!
([dispatch-fn match-fn]
(push-state! dispatch-fn match-fn identity))
([dispatch-fn match-fn identity-fn]
(let [h (pushy dispatch-fn match-fn identity-fn)]
(start! h)
h)))

0 comments on commit f2ef0c2

Please sign in to comment.