venantius / accountant

ClojureScript navigation for single-page applications, made simple.
Eclipse Public License 1.0
250 stars 39 forks source link

fix: port number #38

Closed nicorikken closed 7 years ago

nicorikken commented 7 years ago

The fix proposed in https://github.com/venantius/accountant/pull/35 was too rigorous. Relative URLs lack a port number, and thus a link on a domain with a port triggers a reload. This is not efficient.

This fix resolves this issue by only executing the check in case a port number is specified in the link. Other checks on the domain to ensure proper reloeads are already cared for.

Ports are compared as strings, to avoid any type issues.

nicorikken commented 7 years ago

Sorry, I tested the functionality I desired on my last PR, not the existing functionality. This should fix things. Perhaps some testcases would be nice.

I have verified that this fix is working, with:

venantius commented 7 years ago

I'll try to get a new release of this out this evening. Feel free to remind me if I forget.

edvorg commented 7 years ago

Hi. How is it going with releasing a new version @venantius ?

venantius commented 7 years ago

0.1.9 is now up on Clojars.

edvorg commented 7 years ago

Cool, thank you so much!