From 3acb7da4ef80de7ab1e9bfe402d8d259d77bac85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Marcondes?= <55978943+cauemarcondes@users.noreply.github.com> Date: Fri, 19 Nov 2021 09:29:31 -0500 Subject: [PATCH] [APM] Service maps error after clicking on multiple services (#119077) --- .../app/service_map/Popover/backend_contents.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/service_map/Popover/backend_contents.tsx b/x-pack/plugins/apm/public/components/app/service_map/Popover/backend_contents.tsx index a545f474746a4..6b9954465f39d 100644 --- a/x-pack/plugins/apm/public/components/app/service_map/Popover/backend_contents.tsx +++ b/x-pack/plugins/apm/public/components/app/service_map/Popover/backend_contents.tsx @@ -57,12 +57,14 @@ export function BackendContents({ ); const isLoading = status === FETCH_STATUS.LOADING; - const detailsUrl = apmRouter.link('/backends/overview', { - query: { - ...query, - backendName, - } as TypeOf['query'], - }); + const detailsUrl = backendName + ? apmRouter.link('/backends/overview', { + query: { + ...query, + backendName, + } as TypeOf['query'], + }) + : undefined; const trackEvent = useUiTracker();