diff --git a/packages/ts/lit-form/src/BinderNode.ts b/packages/ts/lit-form/src/BinderNode.ts index cc3776ebb1..5a20213d0b 100644 --- a/packages/ts/lit-form/src/BinderNode.ts +++ b/packages/ts/lit-form/src/BinderNode.ts @@ -160,7 +160,7 @@ export class BinderNode extends EventTa */ get defaultValue(): Value | undefined { const key = this.model[_key]; - const parentDefaultValue = this.parent!.defaultValue as { readonly [key in typeof key]?: Value }; + const parentDefaultValue = (this.parent!.defaultValue ?? {}) as { readonly [key in typeof key]?: Value }; if (this.#isArrayItem() && !(key in parentDefaultValue)) { if (defaultArrayItemCache.has(this.parent)) { @@ -499,7 +499,7 @@ export class BinderNode extends EventTa ? (this.parent.value as { [key in typeof key]: Value })[this.model[_key]] : undefined; - const defaultValue: Value | undefined = this.parent + const defaultValue: Value | undefined = this.parent?.defaultValue ? (this.parent.defaultValue as { readonly [key in typeof key]: Value })[this.model[_key]] : undefined;