Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(react-router): Allow string and object refs in withRouter (#6680)
* fix(react-router): Don't warn about ref objects

* fix(react-router): Don't warn about string refs
  • Loading branch information
eps1lon authored and timdorr committed May 15, 2019
1 parent aeccaeb commit 56c829b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react-router/modules/withRouter.js
Expand Up @@ -36,7 +36,11 @@ function withRouter(Component) {

if (__DEV__) {
C.propTypes = {
wrappedComponentRef: PropTypes.func
wrappedComponentRef: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.object
])
};
}

Expand Down

0 comments on commit 56c829b

Please sign in to comment.