Skip to content

Commit

Permalink
fix: Glass form was not accessable if the glass had no image (#189)
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Groß <mail@gross-johannes.de>
  • Loading branch information
jo-gross authored Mar 4, 2024
1 parent 3941017 commit 96cc360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/glasses/GlassForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function GlassForm(props: GlassFormProps) {
initialValues={{
name: props.glass?.name ?? '',
deposit: props.glass?.deposit ?? 0,
image: props.glass?.GlassImage[0].image ?? undefined,
image: props.glass?.GlassImage?.[0]?.image ?? undefined,
volume: props.glass?.volume ?? 0,
}}
onSubmit={async (values) => {
Expand Down

0 comments on commit 96cc360

Please sign in to comment.