From 7dedc09880837b70ee457370c0c10e1631096028 Mon Sep 17 00:00:00 2001 From: jbiset Date: Mon, 18 Dec 2023 10:07:20 -0300 Subject: [PATCH] Fix message no results on first render --- .../vulnerabilities/dashboards/overview/dashboard.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/main/public/components/overview/vulnerabilities/dashboards/overview/dashboard.tsx b/plugins/main/public/components/overview/vulnerabilities/dashboards/overview/dashboard.tsx index d6a7774983..5c29d40532 100644 --- a/plugins/main/public/components/overview/vulnerabilities/dashboards/overview/dashboard.tsx +++ b/plugins/main/public/components/overview/vulnerabilities/dashboards/overview/dashboard.tsx @@ -62,12 +62,15 @@ const DashboardVulsComponent: React.FC = () => { ) : null} {!isLoadingSearchbar && !isLoading && - (isError || resultIndexData?.hits?.total === 0) ? ( + (isError || + !resultIndexData || + resultIndexData?.hits?.total === 0) ? ( ) : null} {!isLoadingSearchbar && !isLoading && isSuccess && + resultIndexData && resultIndexData?.hits?.total !== 0 ? ( <>