From e06368af25684b58a567d782a8578d8162e67d27 Mon Sep 17 00:00:00 2001 From: ido Date: Fri, 20 Sep 2024 17:42:27 +0300 Subject: [PATCH] fix(uploadFile): null ref --- packages/forms/src/components-control/form-utils/parse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/src/components-control/form-utils/parse.ts b/packages/forms/src/components-control/form-utils/parse.ts index 71001ef..a3bdf6b 100644 --- a/packages/forms/src/components-control/form-utils/parse.ts +++ b/packages/forms/src/components-control/form-utils/parse.ts @@ -214,7 +214,7 @@ export async function parseFiles(about: AboutFormName, astro: AstroGlobal, multi export function parseEmptyFiles(about: AboutFormName, astro: AstroGlobal) { if(astro.props.readonly) return; - if (about.formValue.size === 0) { + if (!about.formValue || about.formValue.size === 0) { about.formValue = null; }