From ae7ab59746172419eba5b7a5ab9773e7e0c199a7 Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Wed, 25 Feb 2026 20:07:05 +0700 Subject: [PATCH] fix(ui): tighten updates action row type narrowing --- ui/src/components/updates/updates-notice-action-row.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ui/src/components/updates/updates-notice-action-row.tsx b/ui/src/components/updates/updates-notice-action-row.tsx index 5bbe1e37..0ac130f0 100644 --- a/ui/src/components/updates/updates-notice-action-row.tsx +++ b/ui/src/components/updates/updates-notice-action-row.tsx @@ -5,9 +5,6 @@ import { CopyButton } from '@/components/ui/copy-button'; import { type SupportNoticeAction } from '@/lib/support-updates-catalog'; export function UpdatesNoticeActionRow({ action }: { action: SupportNoticeAction }) { - const isRouteAction = action.type === 'route' && action.path; - const isCommandAction = action.type === 'command' && action.command; - return (
@@ -16,7 +13,7 @@ export function UpdatesNoticeActionRow({ action }: { action: SupportNoticeAction

{action.description}

- {isRouteAction && ( + {action.type === 'route' && action.path && (
- {isCommandAction && ( + {action.type === 'command' && action.command && (
{action.command}