From 82c5fb88dc3c0b3518febed2b68496b333d5c5e8 Mon Sep 17 00:00:00 2001 From: Nathnael Date: Wed, 22 Jul 2026 07:29:16 +0000 Subject: [PATCH] fix: type errors --- .../src/pages/bookings/new-booking-form/step-documents.tsx | 2 +- .../src/pages/contracts/new-contract-form/step-documents.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/edr-freight-web/portal/src/pages/bookings/new-booking-form/step-documents.tsx b/apps/edr-freight-web/portal/src/pages/bookings/new-booking-form/step-documents.tsx index 48671db4c..de105bf21 100644 --- a/apps/edr-freight-web/portal/src/pages/bookings/new-booking-form/step-documents.tsx +++ b/apps/edr-freight-web/portal/src/pages/bookings/new-booking-form/step-documents.tsx @@ -71,7 +71,7 @@ export function StepDocuments({ form }: { form: BookingForm }) { ) : null; const active = - (targetType && profiles.find((p) => p.type === targetType)) ?? + (targetType ? profiles.find((p) => p.type === targetType) : undefined) ?? profiles[0]; return active?.licenseFiles ?? []; })(); diff --git a/apps/edr-freight-web/portal/src/pages/contracts/new-contract-form/step-documents.tsx b/apps/edr-freight-web/portal/src/pages/contracts/new-contract-form/step-documents.tsx index f2985007f..de4b2bd66 100644 --- a/apps/edr-freight-web/portal/src/pages/contracts/new-contract-form/step-documents.tsx +++ b/apps/edr-freight-web/portal/src/pages/contracts/new-contract-form/step-documents.tsx @@ -82,7 +82,7 @@ export function StepDocuments({ ) : null; const active = - (targetType && profiles.find((p) => p.type === targetType)) ?? + (targetType ? profiles.find((p) => p.type === targetType) : undefined) ?? profiles[0]; return active?.licenseFiles ?? []; })();