visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

onpopstate doesn't include query string when e.state = null #495

Closed cj-idoctours closed 5 years ago

cj-idoctours commented 5 years ago

When e.state = null (like when clicking on a link that is the same as the current location except with a hash), the query parameters were not added to page.show()

This problem occurs on line 998 on page.js

Problem code: 998 page.show(loc.pathname + loc.hash, undefined, undefined, false);

Fix: 998 page.show(location.pathname + location.search + location.hash, undefined, undefined, false);

matthewp commented 5 years ago

This is a bit of a tough one to test.