hashShouldBeFollowed = (origin, destination) =>
  destination.hash !== `` &&
  /**
   * Dynamically created anchor links (href="#my-anchor") do not always
   * have pathname on IE
   */
  (destination.pathname === `` ||
    /* Don't catch links pointed to the same page but with a hash. */
    destination.pathname === origin.pathname)
Don't catch links pointed at what look like file extensions (other than
.htm/html extensions).