Skip to content

Commit

Permalink
Fix #429 for broken react-native 0.63.0. Detect Forwarding Refs
Browse files Browse the repository at this point in the history
Fix for react native 0.63.0. They changed ScrollView to Forwarding Ref
 which caused configOrComp detection to fail facebook/react-native@d2f314a
  • Loading branch information
codler committed Jul 11, 2020
1 parent ff1c79f commit 1fb7ed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/KeyboardAwareHOC.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ function KeyboardAwareHOC(
// listenToKeyboardEvents(ScrollView);
// listenToKeyboardEvents(options)(Comp);
const listenToKeyboardEvents = (configOrComp: any) => {
if (typeof configOrComp === 'object') {
if (typeof configOrComp === 'object' && !configOrComp.displayName) {
return (Comp: Function) => KeyboardAwareHOC(Comp, configOrComp)
} else {
return KeyboardAwareHOC(configOrComp)
Expand Down

0 comments on commit 1fb7ed4

Please sign in to comment.