Skip to content

Commit

Permalink
Merge pull request #35 from nicorikken/feat-port-number
Browse files Browse the repository at this point in the history
feat: port number in check
  • Loading branch information
venantius committed Feb 17, 2017
2 parents 5eaff52 + cfaf782 commit 8be21d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/accountant/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,16 @@
relative-href (str path query fragment)
title (.-title target)
host (.getDomain uri)
port (.getPort uri)
current-host js/window.location.hostname
current-port js/window.location.port
loc js/window.location
current-relative-href (str (.-pathname loc) (.-query loc) (.-hash loc))]
(when (and (not any-key)
(#{"" "_self"} link-target)
(= button 0)
(= host current-host)
(= port current-port)
(not= current-relative-href relative-href)
(path-exists? path))
(set-token! history relative-href title)
Expand Down

0 comments on commit 8be21d2

Please sign in to comment.