From b3b99402b8ab5e9433bd713bd5b556da354ba2c6 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Thu, 6 Jun 2024 11:27:33 -0700 Subject: [PATCH] Fix undefined error when unmounting resize observer (#23) --- frontend/faraday/lib/TileLayout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/faraday/lib/TileLayout.tsx b/frontend/faraday/lib/TileLayout.tsx index 81413d526..c9fdc937f 100644 --- a/frontend/faraday/lib/TileLayout.tsx +++ b/frontend/faraday/lib/TileLayout.tsx @@ -140,7 +140,7 @@ export const TileLayout = ({ layoutTreeStateAtom, className, renderContent, newResizeObserver.observe(overlayContainerRef.current); setResizeObserver(newResizeObserver); return () => { - resizeObserver.disconnect(); + newResizeObserver.disconnect(); }; } }, [updateTransforms, overlayContainerRef]);