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 :).
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 :).