Skip to content

Commit

Permalink
fix(useFormField): optional property access (#2226)
Browse files Browse the repository at this point in the history
  • Loading branch information
romhml authored Sep 20, 2024
1 parent 56118c4 commit 0a054a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/composables/useFormGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const useFormGroup = (inputProps?: InputProps, config?: any, bind: boolea
const formInputs = inject<any>('form-inputs', undefined)

if (formGroup) {
if (!bind || inputProps.legend) {
if (!bind || inputProps?.legend) {
formGroup.inputId.value = undefined
} else if (inputProps?.id) {
// Updates for="..." attribute on label if inputProps.id is provided
Expand Down

0 comments on commit 0a054a5

Please sign in to comment.