Skip to content

Commit

Permalink
fix: handling innerRef (#8)
Browse files Browse the repository at this point in the history
* fix: handling innerRef

* 0.0.7
  • Loading branch information
tjunyamasaki authored Aug 3, 2020
1 parent c673af1 commit 19c4f5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion modules/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ class Link extends Component {

if (router) {
if (withRef) {
props.ref = (c) => withRef(c)
props.ref = (c) => {
if (typeof innerRef === 'function') {
innerRef(c)
}

return withRef(c)
}
}

// If user does not specify a `to` prop, return an empty anchor tag.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quintoandar/react-router",
"version": "0.0.6",
"version": "0.0.7",
"description": "React Router v3 compatible with concurrent mode",
"files": [
"*.md",
Expand Down

0 comments on commit 19c4f5a

Please sign in to comment.