diff --git a/x-pack/solutions/observability/plugins/slo/public/embeddable/slo/overview/slo_overview.tsx b/x-pack/solutions/observability/plugins/slo/public/embeddable/slo/overview/slo_overview.tsx index 63991840ae7cb..335df74537d2b 100644 --- a/x-pack/solutions/observability/plugins/slo/public/embeddable/slo/overview/slo_overview.tsx +++ b/x-pack/solutions/observability/plugins/slo/public/embeddable/slo/overview/slo_overview.tsx @@ -69,26 +69,24 @@ export function SloOverview({ sloId, sloInstanceId, remoteName, reloadSubject }: refetch(); }, [lastRefreshTime, refetch]); - const isSloNotFound = !isLoading && slo === undefined; - - if (isRefetching || isLoading || !slo) { + if (!isLoading && !isRefetching && slo === undefined) { return ( - + {i18n.translate('xpack.slo.sloEmbeddable.overview.sloNotFoundText', { + defaultMessage: + 'The SLO has been deleted. You can safely delete the widget from the dashboard.', + })} ); } - if (isSloNotFound) { + if (isRefetching || isLoading || !slo) { return ( - {i18n.translate('xpack.slo.sloEmbeddable.overview.sloNotFoundText', { - defaultMessage: - 'The SLO has been deleted. You can safely delete the widget from the dashboard.', - })} + );