instant.page icon indicating copy to clipboard operation
instant.page copied to clipboard

Fix empty anchor

Open bakura10 opened this issue 1 year ago • 1 comments

This fixes the issue https://github.com/instantpage/instant.page/issues/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 avatar Apr 04 '24 06:04 bakura10

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

bakura10 avatar Nov 26 '24 14:11 bakura10