Skip to content

Commit

Permalink
fix(plan creation): do not pass cascadeUpdates if it is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlago99 committed Oct 23, 2024
1 parent 0ec7c1c commit 8e96d8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/serializers/serializePlanInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const serializePlanInput = (values: PlanFormInput) => {
}
},
),
cascadeUpdates,
...(typeof cascadeUpdates === 'undefined' ? {} : { cascadeUpdates }),
...otherValues,
}
}
2 changes: 1 addition & 1 deletion src/hooks/plans/usePlanForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export const usePlanForm: ({
}),
) as LocalChargeInput[])
: ([] as LocalChargeInput[]),
cascadeUpdates: false,
cascadeUpdates: undefined,
},
validationSchema: object().shape({
name: string().required(''),
Expand Down

0 comments on commit 8e96d8e

Please sign in to comment.