react-native-keyboard-controller 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -161,8 +161,8 @@ public class KeyboardMovementObserver: NSObject {
161
161
  return
162
162
  }
163
163
 
164
- var keyboardFrameY = keyboardView!.layer.presentation()!.frame.origin.y
165
- var keyboardWindowH = keyboardView!.window!.bounds.size.height
164
+ var keyboardFrameY = keyboardView?.layer.presentation()?.frame.origin.y ?? 0
165
+ var keyboardWindowH = keyboardView?.window?.bounds.size.height ?? 0
166
166
  var keyboardPosition = keyboardWindowH - keyboardFrameY
167
167
 
168
168
  if keyboardPosition == prevKeyboardPosition || keyboardFrameY == 0 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-keyboard-controller",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Keyboard manager which works in identical way on both iOS and Android",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",