File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/react-router-dom/modules Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class Link extends React.Component {
3636 }
3737
3838 render ( ) {
39- const { innerRef, replace, to, ...props } = this . props ; // eslint-disable-line no-unused-vars
39+ const { innerRef, replace, to, ...rest } = this . props ; // eslint-disable-line no-unused-vars
4040
4141 return (
4242 < RouterContext . Consumer >
@@ -51,7 +51,7 @@ class Link extends React.Component {
5151
5252 return (
5353 < a
54- { ...props }
54+ { ...rest }
5555 onClick = { event => this . handleClick ( event , context ) }
5656 href = { href }
5757 ref = { innerRef }
@@ -65,9 +65,10 @@ class Link extends React.Component {
6565
6666if ( __DEV__ ) {
6767 const toType = PropTypes . oneOfType ( [ PropTypes . string , PropTypes . object ] ) ;
68+ const innerRefType = PropTypes . oneOfType ( [ PropTypes . string , PropTypes . func ] ) ;
6869
6970 Link . propTypes = {
70- innerRef : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . func ] ) ,
71+ innerRef : innerRefType ,
7172 onClick : PropTypes . func ,
7273 replace : PropTypes . bool ,
7374 target : PropTypes . string ,
You can’t perform that action at this time.
0 commit comments