From 49edc057a1764b9091838c21bbed40ab3db1988b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petar=20Cvitanovi=C4=87?= <72022639+petar-cvit@users.noreply.github.com> Date: Wed, 22 May 2024 13:59:50 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=AB=99=20default=20to=20empty=20object=20?= =?UTF-8?q?if=20no=20initial=20values=20(#289)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cyclops-ui/src/utils/form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyclops-ui/src/utils/form.tsx b/cyclops-ui/src/utils/form.tsx index 0e05849a..22341b54 100644 --- a/cyclops-ui/src/utils/form.tsx +++ b/cyclops-ui/src/utils/form.tsx @@ -34,7 +34,7 @@ export function flattenObjectKeys( } export function findMaps(fields: any[], values: any, initialValues: any): any { - let out: any = initialValues; + let out: any = initialValues ? initialValues : {}; fields.forEach((field) => { let valuesList: any[] = []; switch (field.type) {