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
parent
e2cfd0d1d1
commit
a2e18ae9ba
|
@ -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 };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue