diff --git a/src/KeyboardAwareBase.js b/src/KeyboardAwareBase.js index abc665f6..c19ec192 100644 --- a/src/KeyboardAwareBase.js +++ b/src/KeyboardAwareBase.js @@ -80,8 +80,8 @@ export default class KeyboardAwareBase extends Component { _scrollToFocusedTextInput() { if (this.props.getTextInputRefs) { const textInputRefs = this.props.getTextInputRefs(); - textInputRefs.some((textInputRef, index, array) => { - const isFocusedFunc = textInputRef.isFocused(); + textInputRefs.some((textInputRef) => { + const isFocusedFunc = textInputRef && (typeof textInputRef.isFocused === "function") && textInputRef.isFocused(); const isFocused = isFocusedFunc && (typeof isFocusedFunc === "function") ? isFocusedFunc() : isFocusedFunc; if (isFocused) { setTimeout(() => {