deleted fields in duplicate form 🎭 (#8808)

* deleted fields in duplicate form  🎭

* Fixed duplicate deleted fields

* Update packages/app-store/routing-forms/trpc/_router.ts

---------

Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
pull/8836/head
Ansari 2023-05-11 13:12:37 +05:30 committed by GitHub
parent e2cfd0d1d1
commit a2e18ae9ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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 };
}