Skip to content

Commit

Permalink
Merge pull request #4 from wavyapp/prevent-crash
Browse files Browse the repository at this point in the history
Prevent crash when input ref is undef
  • Loading branch information
alexlevy0 authored Feb 17, 2020
2 parents 1acebf3 + 6d8c162 commit 275783c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ export class CustomTextInput extends Component {


installKeyboard({ maxLength, customKeyboardType }) {
if (!this.input) {
console.warn('installKeyboard fired without input ref'))
return;
}
install(
findNodeHandle(this.input),
findNodeHandle(this.input || null),
customKeyboardType,
maxLength === undefined ? 1024 : maxLength,
getKeyboardHeightByType(customKeyboardType)
Expand Down

0 comments on commit 275783c

Please sign in to comment.