From ae49ac90a0219f2a6703bbca5c920691c44d5170 Mon Sep 17 00:00:00 2001 From: Nishit Suwal <81785002+NSUWAL123@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:42:22 +0545 Subject: [PATCH] fix(createProjectService): replace all spaces with underscore (#1862) --- src/frontend/src/api/CreateProjectService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/api/CreateProjectService.ts b/src/frontend/src/api/CreateProjectService.ts index 03d3f1eaa..0ad75228c 100755 --- a/src/frontend/src/api/CreateProjectService.ts +++ b/src/frontend/src/api/CreateProjectService.ts @@ -191,7 +191,9 @@ const GenerateProjectFilesService = (url: string, projectData: any, formUpload: try { let response; const additional_entities: string[] = - projectData?.additional_entities?.length > 0 ? [projectData?.additional_entities?.[0].replace(' ', '_')] : []; + projectData?.additional_entities?.length > 0 + ? [projectData?.additional_entities?.[0]?.replaceAll(' ', '_')] + : []; if (projectData.form_ways === 'custom_form') { // TODO move form upload to a separate service / endpoint? const generateApiFormData = new FormData();