diff --git a/x-pack/plugins/observability/public/pages/alerts/components/alert_actions.tsx b/x-pack/plugins/observability/public/pages/alerts/components/alert_actions.tsx index c8f9e422f10be..ca5bdff47bac1 100644 --- a/x-pack/plugins/observability/public/pages/alerts/components/alert_actions.tsx +++ b/x-pack/plugins/observability/public/pages/alerts/components/alert_actions.tsx @@ -79,13 +79,13 @@ export function AlertActions({ const observabilityAlert = parseObservabilityAlert(alert); useEffect(() => { - const alertLink = alert.link as unknown as string; - if (!alert.hasBasePath) { + const alertLink = observabilityAlert.link as unknown as string; + if (!observabilityAlert.hasBasePath) { setViewInAppUrl(prepend(alertLink ?? '')); } else { setViewInAppUrl(alertLink); } - }, [alert.hasBasePath, alert.link, prepend]); + }, [observabilityAlert.hasBasePath, observabilityAlert.link, prepend]); const [isPopoverOpen, setIsPopoverOpen] = useState(false);