From a2e18ae9ba9b9752436e90367de4e82f3a3b6508 Mon Sep 17 00:00:00 2001 From: Ansari Date: Thu, 11 May 2023 13:12:37 +0530 Subject: [PATCH] =?UTF-8?q?deleted=20fields=20in=20duplicate=20form=20=20?= =?UTF-8?q?=F0=9F=8E=AD=20(#8808)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deleted fields in duplicate form 🎭 * Fixed duplicate deleted fields * Update packages/app-store/routing-forms/trpc/_router.ts --------- Co-authored-by: Hariom Balhara Co-authored-by: Keith Williams --- packages/app-store/routing-forms/trpc/_router.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/app-store/routing-forms/trpc/_router.ts b/packages/app-store/routing-forms/trpc/_router.ts index 1830454f06..28b8228c14 100644 --- a/packages/app-store/routing-forms/trpc/_router.ts +++ b/packages/app-store/routing-forms/trpc/_router.ts @@ -516,8 +516,7 @@ const appRoutingForms = router({ // Duplicate just routes and fields // We don't want name, description and responses to be copied routes = routesParsed.data || []; - // FIXME: Deleted fields shouldn't come in duplicate - fields = fieldsParsed.data || []; + fields = fieldsParsed.data ? fieldsParsed.data.filter((f) => !f.deleted) : []; } return { routes, fields }; }