Skip to content

Commit

Permalink
Merge 3e990d7 into 43aab2d
Browse files Browse the repository at this point in the history
  • Loading branch information
skrhlm committed Oct 11, 2019
2 parents 43aab2d + 3e990d7 commit d16d32f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default class Link extends React.Component {
href,
children,
patch,
passHref,
...rest
} = this.props;

Expand All @@ -63,7 +64,7 @@ export default class Link extends React.Component {
isAnchor = true;
} else {
child = Children.only(children);
isAnchor = child.type === "a";
isAnchor = child.type === "a" || passHref;
}

if (isAnchor) {
Expand Down Expand Up @@ -110,6 +111,7 @@ Link.propTypes = {
query: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
hash: PropTypes.string,
patch: PropTypes.bool,
passHref: PropTypes.bool,
};

Link.defaultProps = {
Expand All @@ -119,4 +121,5 @@ Link.defaultProps = {
query: "",
hash: "",
patch: false,
passHref: false,
};

0 comments on commit d16d32f

Please sign in to comment.