If the document location is set to a similar URL, do not reload the page.
To fix this I added the following line of code, but I can imagine the URL comparison can be optimized (e.g. by removing blanks at the end of the url):
set href(url) {
if (url === $url || url+'#' === $url || url === $url+'#') { return; }
...
}
See orslumen@a72ff2e