mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 11:39:51 +01:00
fix: access document on client
This commit is contained in:
1 parent
31055f1d66
commit
9818c9868a
1 file changed
+3
-1
@@ -183,7 +183,9 @@ export function Options({ isFullScreen }: OptionsProps) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (isFullScreen) {
|
if (isFullScreen) {
|
||||||
document.exitFullscreen();
|
document.exitFullscreen();
|
||||||
} else document.body.requestFullscreen();
|
} else if (typeof document !== 'undefined') {
|
||||||
|
document.body.requestFullscreen();
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isFullScreen ? <ExitFullScreenIcon /> : <EnterFullScreenIcon />}
|
{isFullScreen ? <ExitFullScreenIcon /> : <EnterFullScreenIcon />}
|
||||||
|
|||||||
Reference in new issue
Block a user