From 38485b96f163b5eaa8b7b9ddba5bff910130ab5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yigit=2C=20=C3=96zlem=20=28UIT=29?= Date: Mon, 9 Oct 2023 17:59:53 +0200 Subject: [PATCH] fix: fixed all build bugs --- packages/components/src/internal/form.ts | 4 ++-- packages/components/src/internal/solid-element.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/components/src/internal/form.ts b/packages/components/src/internal/form.ts index 5dd9744a8..6ebf07f1f 100644 --- a/packages/components/src/internal/form.ts +++ b/packages/components/src/internal/form.ts @@ -122,7 +122,7 @@ export class FormControlController implements ReactiveController { } if (this.host.hasUpdated) { - this.setValidity(this.host.validity.valid); + this.setValidity(this.host?.validity!.valid); } } @@ -347,7 +347,7 @@ export class FormControlController implements ReactiveController { */ updateValidity() { const host = this.host; - this.setValidity(host.validity.valid); + this.setValidity(host?.validity!.valid); } /** diff --git a/packages/components/src/internal/solid-element.ts b/packages/components/src/internal/solid-element.ts index f95835e99..fb0c641fd 100644 --- a/packages/components/src/internal/solid-element.ts +++ b/packages/components/src/internal/solid-element.ts @@ -55,8 +55,8 @@ export interface SolidFormControl extends SolidElement { maxlength?: number; // Form validation properties - readonly validity: ValidityState; - readonly validationMessage: string; + readonly validity?: ValidityState; + readonly validationMessage?: string; // Validation methods checkValidity: () => boolean;