Tantawi65 commited on
Commit
7e96d5d
·
1 Parent(s): 3c368c6

Fix TypeScript error with screen.orientation.lock

Browse files
client/src/components/ui/LandscapeOverlay.tsx CHANGED
@@ -11,9 +11,10 @@ export function LandscapeOverlay() {
11
  }
12
 
13
  // Try to lock to landscape
14
- if (screen.orientation && screen.orientation.lock) {
 
15
  try {
16
- await screen.orientation.lock('landscape');
17
  } catch (e) {
18
  console.log('Orientation lock not supported');
19
  }
 
11
  }
12
 
13
  // Try to lock to landscape
14
+ const orientation = screen.orientation as any;
15
+ if (orientation && orientation.lock) {
16
  try {
17
+ await orientation.lock('landscape');
18
  } catch (e) {
19
  console.log('Orientation lock not supported');
20
  }