Skip to content
Permalink
Browse files

fix: escape path in isCurrent check

  • Loading branch information...
stefanprobst authored and ryanflorence committed Dec 1, 2018
1 parent 3958c4e commit 137a1ae931d62afe1e1bb0f6180ad9347baacb4c
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/index.js
@@ -402,8 +402,9 @@ let Link = forwardRef(({ innerRef, ...props }, ref) => (
{({ location, navigate }) => {
let { to, state, replace, getProps = k, ...anchorProps } = props;
let href = resolve(to, baseuri);
let isCurrent = location.pathname === href;
let isPartiallyCurrent = startsWith(location.pathname, href);
let encodedHref = encodeURI(href)
let isCurrent = location.pathname === encodedHref;
let isPartiallyCurrent = startsWith(location.pathname, encodedHref);

return (
<a

0 comments on commit 137a1ae

Please sign in to comment.
You can’t perform that action at this time.