Skip to content

Commit 3f747ea

Browse files
authored
Merge pull request APSL#283 from kerb-technologies/master
Fix bug where ref is null
2 parents ea1c11b + a580222 commit 3f747ea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/KeyboardAwareHOC.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,11 @@ function listenToKeyboardEvents(ScrollableComponent: React$Component) {
410410
}
411411

412412
_handleRef = (ref: React.Component<*>) => {
413-
this._rnkasv_keyboardView = ref.getNode ? ref.getNode() : ref
414-
if (this.props.innerRef) {
415-
this.props.innerRef(this._rnkasv_keyboardView)
413+
if (ref) {
414+
this._rnkasv_keyboardView = ref.getNode ? ref.getNode() : ref
415+
if (this.props.innerRef) {
416+
this.props.innerRef(this._rnkasv_keyboardView)
417+
}
416418
}
417419
}
418420

0 commit comments

Comments
 (0)