Skip to content

Commit 2a7e821

Browse files
fix: if condition
1 parent 764aec7 commit 2a7e821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Global/ScreenOrientationLocker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function ScreenOrientationLocker() {
2020

2121
const handleOrientationChange = () => {
2222
// if the orientation is no longer portrait, try to lock it back.
23-
if (!screen.orientation.type.startsWith('portrait')) {
23+
if (screen.orientation && !screen.orientation.type.startsWith('portrait')) {
2424
lockOrientation()
2525
}
2626
}

0 commit comments

Comments
 (0)