We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b014a4 commit 436d99eCopy full SHA for 436d99e
src-ts/lib/form/form-functions/form.functions.ts
@@ -45,9 +45,10 @@ export function initializeValues<T extends FormValue>(
45
if (input.type === 'checkbox') {
46
input.value = input.checked || false
47
} else {
48
- input.value = Object.prototype.hasOwnProperty.call(formValues, input.name)
49
- ? (formValues as { [id: string]: InputValue })[input.name]
50
- : undefined
+ input.value
+ = !!formValues && Object.prototype.hasOwnProperty.call(formValues, input.name)
+ ? (formValues as { [id: string]: InputValue })[input.name]
51
+ : undefined
52
}
53
54
0 commit comments