mirror of
https://github.com/streamich/react-use.git
synced 2026-01-25 14:17:16 +00:00
fix: 🐛 fix typings in useOrientation sensor
This commit is contained in:
parent
d89bd54cba
commit
afbacace24
@ -26,7 +26,7 @@ const useOrientation = (initialState: OrientationState = defaultState) => {
|
||||
setState({angle, type});
|
||||
} else if (window.orientation) {
|
||||
setState({
|
||||
angle: window.orientation,
|
||||
angle: typeof window.orientation === 'number' ? window.orientation : 0,
|
||||
type: ''
|
||||
});
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user