We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9ec4e1 commit a3dff2dCopy full SHA for a3dff2d
src/components/Zoom.tsx
@@ -110,11 +110,11 @@ export default function Zoom({ children }: PropsWithChildren) {
110
111
const updateRect = () => setRect(node ? { width: node.clientWidth, height: node.clientHeight } : undefined);
112
113
+ updateRect();
114
+
115
if (node && typeof ResizeObserver !== "undefined") {
116
observer.current = new ResizeObserver(updateRect);
117
observer.current.observe(node);
- } else {
- updateRect();
118
}
119
}, []);
120
0 commit comments