Browse files

add null check for keyboardFrame variable in KeyboardAvoidingView com…


This is a critical change and should be pushed to stabel asap

The reason for the pull request is to prevent crashes that can occure if the function relativeKeyboardHeight(keyboardFrame: ScreenRect) got null as an input variable which sometimes does happen.
Closes #10287

Differential Revision: D3988359

Pulled By: bestander

fbshipit-source-id: 0d1052b590b2684907ea6f7d6b4fe9b89989d4dd
  • Loading branch information...
1 parent b7ded13 commit 770091f3c13f7c1bd77c50f979d89a774001fbf0 @Isakdl Isakdl committed with Facebook Github Bot Oct 9, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 Libraries/Components/Keyboard/KeyboardAvoidingView.js
@@ -87,7 +87,7 @@ const KeyboardAvoidingView = React.createClass({
relativeKeyboardHeight(keyboardFrame: ScreenRect): number {
const frame = this.frame;
- if (!frame) {
+ if (!frame || !keyboardFrame) {
return 0;

0 comments on commit 770091f

Please sign in to comment.