Skip to content

Commit

Permalink
Link - add element shape for innerRef (#6886)
Browse files Browse the repository at this point in the history
  • Loading branch information
nescalante authored and timdorr committed Aug 27, 2019
1 parent 4697455 commit ee4fcff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/Link.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import createReactClass from 'create-react-class'
import { bool, object, string, func, oneOfType } from 'prop-types'
import { bool, object, string, func, oneOfType, shape, elementType } from 'prop-types'
import invariant from 'invariant'
import { routerShape } from './PropTypes'
import { ContextSubscriber } from './ContextUtils'
Expand Down Expand Up @@ -55,7 +55,11 @@ const Link = createReactClass({
onlyActiveOnIndex: bool.isRequired,
onClick: func,
target: string,
innerRef: oneOfType([ string, func ])
innerRef: oneOfType([
string,
func,
shape({ current: elementType })
])
},

getDefaultProps() {
Expand Down

0 comments on commit ee4fcff

Please sign in to comment.