Skip to content

Commit

Permalink
fix: Use proper href value for a tag within Link
Browse files Browse the repository at this point in the history
  • Loading branch information
jplhomer committed Sep 11, 2020
1 parent 9e40c3c commit 055b6cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/link.js
Expand Up @@ -94,7 +94,7 @@ export default function Link(props) {
// If child is an <a> tag and doesn't have a href attribute, or if the 'passHref' property is
// defined, we specify the current 'href', so that repetition is not needed by the user
if (props.passHref || (child.type === "a" && !("href" in child.props))) {
childProps.href = href;
childProps.href = as || href;
}

return React.cloneElement(child, childProps);
Expand Down

0 comments on commit 055b6cf

Please sign in to comment.