mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-19 06:04:05 +00:00
refactor: prevent calling undefined (#521)
This commit is contained in:
@@ -42,7 +42,7 @@ export default function useFullscreen() {
|
|||||||
});
|
});
|
||||||
} else if (element.webkitRequestFullscreen) {
|
} else if (element.webkitRequestFullscreen) {
|
||||||
// iOS Safari fullscreen API is supported
|
// iOS Safari fullscreen API is supported
|
||||||
element.webkitRequestFullscreen().catch(() => {
|
element.webkitRequestFullscreen?.().catch(() => {
|
||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ export default function useFullscreen() {
|
|||||||
});
|
});
|
||||||
} else if ((document as WebkitDocument).webkitExitFullscreen) {
|
} else if ((document as WebkitDocument).webkitExitFullscreen) {
|
||||||
// iOS Safari fullscreen API is supported
|
// iOS Safari fullscreen API is supported
|
||||||
(document as WebkitDocument).webkitExitFullscreen().catch(() => {
|
(document as WebkitDocument).webkitExitFullscreen?.().catch(() => {
|
||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user