Skip to content

Commit 0a054a5

Browse files
authoredSep 20, 2024··
fix(useFormField): optional property access (#2226)

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/runtime/composables/useFormGroup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const useFormGroup = (inputProps?: InputProps, config?: any, bind: boolea
1818
const formInputs = inject<any>('form-inputs', undefined)
1919

2020
if (formGroup) {
21-
if (!bind || inputProps.legend) {
21+
if (!bind || inputProps?.legend) {
2222
formGroup.inputId.value = undefined
2323
} else if (inputProps?.id) {
2424
// Updates for="..." attribute on label if inputProps.id is provided

0 commit comments

Comments
 (0)
Please sign in to comment.