Skip to content

Commit

Permalink
Make sure keyboardWill(Show|Hide)Event exists (APSL#79)
Browse files Browse the repository at this point in the history
It can be undefined causing app crashes
  • Loading branch information
pietropizzi authored and alvaromb committed Nov 16, 2016
1 parent 4302b97 commit 70b7955
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/KeyboardAwareMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ const KeyboardAwareMixin = {
},

componentWillUnmount: function () {
this.keyboardWillShowEvent.remove()
this.keyboardWillHideEvent.remove()
this.keyboardWillShowEvent && this.keyboardWillShowEvent.remove()
this.keyboardWillHideEvent && this.keyboardWillHideEvent.remove()
},

scrollToPosition: function (x: number, y: number, animated: bool = false) {
Expand Down

0 comments on commit 70b7955

Please sign in to comment.