From 287b84875bc9fc379e930a52fafa6a123fa6dcdc Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 25 Sep 2026 16:25:30 +0200 Subject: [PATCH] fix(budget): show the link controls on an explicit null check targetId is a number or null; a bare && would render a 0 if it were ever 0 (Sonar S6439). --- client/src/components/Planner/BookingCostsSection.tsx | 2 +- client/src/mobile/screens/trip/sheets/MLinkedCosts.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/Planner/BookingCostsSection.tsx b/client/src/components/Planner/BookingCostsSection.tsx index f8c5e9bec..af3cb7278 100644 --- a/client/src/components/Planner/BookingCostsSection.tsx +++ b/client/src/components/Planner/BookingCostsSection.tsx @@ -100,7 +100,7 @@ export function BookingCostsSection({ reservationId, placeId = null, hintKey = ' {t('reservations.createExpense')} {/* Linking needs the record to exist, so it waits for the first save. */} - {targetId && ( + {targetId !== null && ( { diff --git a/client/src/mobile/screens/trip/sheets/MLinkedCosts.tsx b/client/src/mobile/screens/trip/sheets/MLinkedCosts.tsx index 1a1dbe1d0..ab4862348 100644 --- a/client/src/mobile/screens/trip/sheets/MLinkedCosts.tsx +++ b/client/src/mobile/screens/trip/sheets/MLinkedCosts.tsx @@ -92,7 +92,7 @@ export default function MLinkedCosts({ reservationId = null, placeId = null, hin {t('reservations.createExpense')} {/* Linking needs the record to exist, so it waits for the first save. */} - {targetId && ( + {targetId !== null && (