Dogstudio / highway

Highway - A Modern Javascript Transitions Manager
https://highway.js.org/
MIT License
1.43k stars 92 forks source link

Navigation with parameters and anchor not working #98

Closed webravenz closed 2 years ago

webravenz commented 3 years ago

Hello,

I got an issue with ajax navigation on a page with url get parameters and an anchor, I found an issue related but I think it was missing some explanation : #54

For example if I want to navigate between those different urls :

Highway consider that it's the same url with an anchor, but they have different parameters

I found this condition on render function in Highway Core, should it also check if params are different not only pathname ?

if (location.origin !== this.location.origin || location.anchor && location.pathname === this.location.pathname) {
        // We redirect when origins are differents or when there is an anchor.
        window.location.href = href;
}