Skip to content

Commit 0a6a2f4

Browse files
committed
Fix initial viewer fullscreen state
1 parent 3518d19 commit 0a6a2f4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/app/App.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2785,9 +2785,10 @@ export function App() {
27852785

27862786
useEffect(() => {
27872787
const onFullscreenChange = () => {
2788+
const stage = viewerStageRef.current;
27882789
setOverlayVisibility(
27892790
"viewerFullscreen",
2790-
document.fullscreenElement === viewerStageRef.current
2791+
Boolean(stage) && document.fullscreenElement === stage
27912792
);
27922793
};
27932794

0 commit comments

Comments
 (0)