1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-10 22:11:50 +02:00

Chore: Desktop: Fix layout-related warning shown in console on startup (#12452)

This commit is contained in:
Henry Heino
2025-06-10 16:14:08 -07:00
committed by GitHub
parent f6056b2d75
commit c9936723c8

View File

@@ -56,7 +56,7 @@ const useWindowRefocusManager = (route: AppStateRoute) => {
};
const useContainerSize = (container: HTMLElement|null) => {
const [size, setSize] = useState({ width: container?.clientWidth, height: container?.clientHeight });
const [size, setSize] = useState({ width: container?.clientWidth ?? 0, height: container?.clientHeight ?? 0 });
useEffect(() => {
if (!container) return () => {};