Skip to content

Commit

Permalink
forwarded ref might be instance of component
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenmemon committed May 11, 2021
1 parent 99c89e9 commit b5bd553
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/withLocalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ function withLocalizeHOC(WrappedComponent) {
WithLocalize.displayName = `WithLocalize(${getComponentDisplayName(WrappedComponent)})`;
WithLocalize.propTypes = {
preferredLocale: PropTypes.string,
forwardedRef: PropTypes.func,
forwardedRef: PropTypes.oneOfType([
PropTypes.func,
PropTypes.shape({current: PropTypes.instanceOf(React.Component)}),
]),
};
WithLocalize.defaultProps = {
preferredLocale: 'en',
Expand Down

0 comments on commit b5bd553

Please sign in to comment.