diff --git a/apps/web/src/components/bottleForm.tsx b/apps/web/src/components/bottleForm.tsx index c38ac886..122c5270 100644 --- a/apps/web/src/components/bottleForm.tsx +++ b/apps/web/src/components/bottleForm.tsx @@ -343,7 +343,7 @@ export default function BottleForm({ error={errors.distillers} searchContext={{ type: "distiller", - brand: brandValue ? Number(brandValue.id) : null, + brand: brandValue?.id ? Number(brandValue.id) : null, bottleName: watch("name"), }} label="Distiller" @@ -397,7 +397,7 @@ export default function BottleForm({ suggestedOptions={brandValue ? [brandValue] : []} searchContext={{ type: "bottler", - brand: brandValue ? Number(brandValue.id) : null, + brand: brandValue?.id ? Number(brandValue.id) : null, bottleName: watch("name"), }} onChange={(value) => {