mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-26 19:41:29 +08:00
fix(web): handle undefined screen.orientation (#20064)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user