Skip to content

Commit 0646472

Browse files
🐛 useKeyboard: mark start coordinate as undefined
Since the start coordinate isn't available on android, the start coordinate can be either undefined or ScreenRect This @types change makes that nuance a bit more clear DefinitelyTyped/DefinitelyTyped@f6b2d01#diff-e94ad9b79ba4f07235bfefa12c2789cd2d6cb690d9120309555f33ae51295244
1 parent 85f4fb1 commit 0646472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useKeyboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const initialValue = {
1515
export function useKeyboard() {
1616
const [shown, setShown] = useState(false)
1717
const [coordinates, setCoordinates] = useState<{
18-
start: ScreenRect
18+
start: undefined | ScreenRect
1919
end: ScreenRect
2020
}>(initialValue)
2121
const [keyboardHeight, setKeyboardHeight] = useState<number>(0)

0 commit comments

Comments
 (0)