Skip to content

Do not reload page if location.href has not changed #25

@orslumen

Description

@orslumen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions