Skip to content

Commit

Permalink
Dont add brand to search context without id
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Aug 21, 2024
1 parent 95d7a78 commit 02a80ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/components/bottleForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 02a80ed

Please sign in to comment.