Fix undefined error when unmounting resize observer (#23)

This commit is contained in:
Evan Simkowitz 2024-06-06 11:27:33 -07:00 committed by GitHub
parent 1bc4e0c594
commit b3b99402b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,7 +140,7 @@ export const TileLayout = <T,>({ layoutTreeStateAtom, className, renderContent,
newResizeObserver.observe(overlayContainerRef.current);
setResizeObserver(newResizeObserver);
return () => {
resizeObserver.disconnect();
newResizeObserver.disconnect();
};
}
}, [updateTransforms, overlayContainerRef]);