Skip to content

Commit

Permalink
Merge pull request #41 from smee/issue-40
Browse files Browse the repository at this point in the history
[fix #40] Prevent new HTML5 history entry when clicking a link to the cur…
  • Loading branch information
venantius authored Feb 28, 2017
2 parents 958f36e + 3f4fca5 commit 3d0b3df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/accountant/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@
(= button 0)
(= host current-host)
(or (not port)
(= (str port) (str current-port)))
(not= current-relative-href relative-href)
(= (str port) (str current-port)))
(path-exists? path))
(set-token! history relative-href title)
(when (not= current-relative-href relative-href) ;; do not add duplicate html5 history state
(set-token! history relative-href title))
(.preventDefault e))))))

(defonce nav-handler nil)
Expand Down

0 comments on commit 3d0b3df

Please sign in to comment.