Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/KeyboardAwareHOC.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ const ScrollIntoViewDefaultOptions: KeyboardAwareHOCOptions = {
// see https://github.com/facebook/react-native/issues/19650
// see https://stackoverflow.com/questions/42051368/scrollto-is-undefined-on-animated-scrollview/48786374
// see https://github.com/facebook/react-native/commit/66e72bb4e00aafbcb9f450ed5db261d98f99f82a
const shouldCallGetNode = !Platform.constants || (Platform.constants.reactNativeVersion.major === 0 && Platform.constants.reactNativeVersion.minor < 62)
const shouldCallGetNode =
typeof Platform?.constants?.reactNativeVersion === 'object' &&
Platform.constants.reactNativeVersion.major === 0 &&
Platform.constants.reactNativeVersion.minor < 62;

if (ref.getNode && shouldCallGetNode) {
return ref.getNode()
} else {
Expand Down