fix: access document on client

This commit is contained in:
TrèsAbhi committed 2024-04-01 22:00:38 -05:00
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 />}