From b0ca64f3cb9b37e5caba7123283286eda07b46e0 Mon Sep 17 00:00:00 2001 From: sawka Date: Fri, 5 Jul 2024 16:20:36 -0700 Subject: [PATCH] null check --- frontend/faraday/lib/TileLayout.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/frontend/faraday/lib/TileLayout.tsx b/frontend/faraday/lib/TileLayout.tsx index 3c51efbd0..245bf8631 100644 --- a/frontend/faraday/lib/TileLayout.tsx +++ b/frontend/faraday/lib/TileLayout.tsx @@ -271,14 +271,16 @@ function TileLayoutComponent({ layoutTreeStateAtom, contents, getCursorPoint className="overlay-container" style={{ top: 10000, ...overlayTransform }} > - + {!layoutTreeState?.rootNode ? null : ( + + )} @@ -565,7 +567,7 @@ const OverlayNode = ({ return nodeRefs; }); }; - }, [overlayRef, layoutNode.id]); + }, [overlayRef, layoutNode?.id]); function onPointerOverLeaf(event: React.PointerEvent) { event.stopPropagation();