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 ?? []; })();