Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent going to the root when setting up the initial hashchange route #447

Merged
merged 1 commit into from
Jan 17, 2018

Conversation

matthewp
Copy link
Collaborator

Fixes #242

@coveralls
Copy link

coveralls commented Jan 17, 2018

Coverage Status

Coverage decreased (-0.4%) to 90.588% when pulling cf36f16 on root-hash into 0ad0b2b on master.

@tleunen
Copy link

tleunen commented Feb 12, 2018

@matthewp For some reasons, this change is breaking for me when having page.setup({ hashbang: true }) and using a local file (file://something/index.html) like in an electron environment.

This causes an infinite reload page since this line is always false (https://github.com/visionmedia/page.js/blob/master/page.js#L790). The reason is because getBase() uses loc.pathname, which is the location of the file (file://...), but ctx.canonicalPath is an empty string "" instead of being also loc.pathname.

@PaulMaly
Copy link
Contributor

@tleunen Is it fixed?

@tleunen
Copy link

tleunen commented Aug 22, 2018

No idea. I have stopped using it. And I don't work in the codebase which were using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants