From e529bee5683189494b3ff0695d24e7b9a4ea379c Mon Sep 17 00:00:00 2001 From: oatkiller Date: Thu, 3 Sep 2020 16:06:23 -0400 Subject: [PATCH] [Resolver] Only render resolver once we have a signals index --- .../timelines/components/graph_overlay/index.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/graph_overlay/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/graph_overlay/index.tsx index 1a0582cb58844..dc9557da70f91 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/graph_overlay/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/graph_overlay/index.tsx @@ -141,13 +141,12 @@ const GraphOverlayComponent = ({ const { signalIndexName } = useSignalIndex(); const [siemDefaultIndices] = useUiSetting$(DEFAULT_INDEX_KEY); - const indices: string[] = useMemo(() => { - const allIndices = [...siemDefaultIndices]; - - if (signalIndexName !== null) { - allIndices.push(signalIndexName); + const indices: string[] | null = useMemo(() => { + if (signalIndexName === null) { + return null; + } else { + return [...siemDefaultIndices, signalIndexName]; } - return allIndices; }, [signalIndexName, siemDefaultIndices]); return ( @@ -191,7 +190,7 @@ const GraphOverlayComponent = ({ - {graphEventId !== undefined && ( + {graphEventId !== undefined && indices !== null && (