mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
null check
This commit is contained in:
parent
15cc681b4b
commit
b0ca64f3cb
@ -271,14 +271,16 @@ function TileLayoutComponent<T>({ layoutTreeStateAtom, contents, getCursorPoint
|
||||
className="overlay-container"
|
||||
style={{ top: 10000, ...overlayTransform }}
|
||||
>
|
||||
<OverlayNode
|
||||
layoutNode={layoutTreeState.rootNode}
|
||||
layoutTreeState={layoutTreeState}
|
||||
dispatch={dispatch}
|
||||
nodeRefsAtom={nodeRefsAtom}
|
||||
showOverlayAtom={showOverlayAtom}
|
||||
siblingSize={layoutTreeState.rootNode?.size}
|
||||
/>
|
||||
{!layoutTreeState?.rootNode ? null : (
|
||||
<OverlayNode
|
||||
layoutNode={layoutTreeState.rootNode}
|
||||
layoutTreeState={layoutTreeState}
|
||||
dispatch={dispatch}
|
||||
nodeRefsAtom={nodeRefsAtom}
|
||||
showOverlayAtom={showOverlayAtom}
|
||||
siblingSize={layoutTreeState.rootNode?.size}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Suspense>
|
||||
@ -565,7 +567,7 @@ const OverlayNode = <T,>({
|
||||
return nodeRefs;
|
||||
});
|
||||
};
|
||||
}, [overlayRef, layoutNode.id]);
|
||||
}, [overlayRef, layoutNode?.id]);
|
||||
|
||||
function onPointerOverLeaf(event: React.PointerEvent<HTMLDivElement>) {
|
||||
event.stopPropagation();
|
||||
|
Loading…
Reference in New Issue
Block a user