Skip to content

IE9 cannot parse current url correctly #86

@chunminglu

Description

@chunminglu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions