fix(web): handle undefined screen.orientation

This commit is contained in:
Arthur Simas 2025-09-14 00:10:09 -03:00
parent 41ed013cc4
commit 39bd720d71
No known key found for this signature in database
GPG Key ID: 3760AF0C6EC0AF12

View File

@ -401,7 +401,7 @@ export default function LiveCameraView({
useEffect(() => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const screenOrientation = screen.orientation as any;
if (!screenOrientation.lock || !screenOrientation.unlock) {
if (!screenOrientation?.lock || !screenOrientation?.unlock) {
// Browser does not support ScreenOrientation APIs that we need
return;
}