Skip to content

Commit 436d99e

Browse files
TCA-645 Fix bug #time 15m
1 parent 9b014a4 commit 436d99e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src-ts/lib/form/form-functions/form.functions.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ export function initializeValues<T extends FormValue>(
4545
if (input.type === 'checkbox') {
4646
input.value = input.checked || false
4747
} else {
48-
input.value = Object.prototype.hasOwnProperty.call(formValues, input.name)
49-
? (formValues as { [id: string]: InputValue })[input.name]
50-
: undefined
48+
input.value
49+
= !!formValues && Object.prototype.hasOwnProperty.call(formValues, input.name)
50+
? (formValues as { [id: string]: InputValue })[input.name]
51+
: undefined
5152
}
5253
}
5354
}

0 commit comments

Comments
 (0)