Skip to content

Commit

Permalink
refactor(roundingPrecision): default to empty instead of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlago99 committed Nov 4, 2024
1 parent 57ed367 commit fc4eaa4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/CreateBillableMetric.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const CreateBillableMetric = () => {
recurring: billableMetric?.recurring || false,
filters: billableMetric?.filters || [],
roundingFunction: billableMetric?.roundingFunction || undefined,
roundingPrecision: billableMetric?.roundingPrecision || 0,
roundingPrecision: billableMetric?.roundingPrecision,
},
validationSchema: object().shape({
name: string().required(''),
Expand Down Expand Up @@ -518,7 +518,6 @@ const CreateBillableMetric = () => {
startIcon="plus"
onClick={() => {
formikProps.setFieldValue('roundingFunction', null)
formikProps.setFieldValue('roundingPrecision', 0)
}}
>
{translate('text_173055464264877451cjmqa1')}
Expand Down Expand Up @@ -586,7 +585,7 @@ const CreateBillableMetric = () => {
e.stopPropagation()

formikProps.setFieldValue('roundingFunction', undefined)
formikProps.setFieldValue('roundingPrecision', 0)
formikProps.setFieldValue('roundingPrecision', undefined)
}}
/>
</div>
Expand Down

0 comments on commit fc4eaa4

Please sign in to comment.