diff --git a/lib/useKeyboard.js b/lib/useKeyboard.js index 12648966..915b189e 100644 --- a/lib/useKeyboard.js +++ b/lib/useKeyboard.js @@ -8,8 +8,8 @@ export default function useKeyboard() { setKeyboard({ isKeyboardShow: true, Keyboard, - endCoordinates: e.endCoordinates, - startCoordinates: e.startCoordinates + endCoordinates: e ? e.endCoordinates : null, + startCoordinates: e ? e.startCoordinates : null }) } @@ -17,8 +17,8 @@ export default function useKeyboard() { setKeyboard({ isKeyboardShow: false, Keyboard, - endCoordinates: e.endCoordinates, - startCoordinates: e.startCoordinates + endCoordinates: e ? e.endCoordinates : null, + startCoordinates: e ? e.startCoordinates : null }) }