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

Fix empty anchor #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix empty anchor #129

wants to merge 1 commit into from

Conversation

bakura10
Copy link

@bakura10 bakura10 commented Apr 4, 2024

This fixes the issue #61

To elaborate, browsers seem to have an odd behavior. If a link has a href set to #test, anchorElement.hash will properly return #test. However, if the link is just using #, browsers will return empty string instead of #, which will cause Instant.Page to preload such links, which is causing some pretty annoying side-effects in our situation.

We might may be also check for /#, just to be on the safe side. @dieulot I will let you decide on this :).

@bakura10
Copy link
Author

@dieulot , I've came across this issue once more today. Any idea if you could merge this or not? :)

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.

1 participant