diff --git a/apps/web/server/routers/quote/index.ts b/apps/web/server/routers/quote/index.ts index fb01861..999260f 100644 --- a/apps/web/server/routers/quote/index.ts +++ b/apps/web/server/routers/quote/index.ts @@ -71,10 +71,7 @@ export const quoteRouter = router({ ].map(({ getKPData }) => getKPData(input)) ); - const values = processData.reduce( - (obj, data) => Object.assign(obj, data.values), - defaultValues - ); + const values = processData.reduce((obj, data) => ({ ...obj, ...data.values }), defaultValues); const payments = processData.find((x) => x.payments)?.payments ?? defaultPayments; const insurance = processData.find((x) => x.insurance)?.insurance ?? defaultInsurance; const fingap = processData.find((x) => x.fingap)?.fingap ?? defaultFingap;