Hello, my current url has pathname, and therefore like this format:
"http://localhost/pathname/"
And after pagination it should look like this:
"http://localhost/pathname/?page=2"
However after pushState function, the url becomes this:
"http://localhost/pathname/#/pathname/?page=2"
To figure out where causes the problem, I have a look at the source code, and find that in changeState function, there is a line like this:
// if current url not equal new url
if (urlObject._relative !== parseURL()._relative) {
Instead of getting current url, however, parseURL() gets the base url, and therefore causes the problem. I fill in current url to parseURL, and then all functionality works fine.
I'm not sure if this modification will break other functions. Could you please have a look at this and see if there is another way to solve this problem without modifying the library's source code? Thanks very much.
Hello, my current url has pathname, and therefore like this format:
"http://localhost/pathname/"
And after pagination it should look like this:
"http://localhost/pathname/?page=2"
However after pushState function, the url becomes this:
"http://localhost/pathname/#/pathname/?page=2"
To figure out where causes the problem, I have a look at the source code, and find that in changeState function, there is a line like this:
Instead of getting current url, however, parseURL() gets the base url, and therefore causes the problem. I fill in current url to parseURL, and then all functionality works fine.
I'm not sure if this modification will break other functions. Could you please have a look at this and see if there is another way to solve this problem without modifying the library's source code? Thanks very much.