diff --git a/src/shared/utils.ts b/src/shared/utils.ts index ad7f592b..0b53ae2e 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -52,7 +52,8 @@ export function formatEvent(event: DetailedEvent): FormattedEvent { } export function formatToThreeDecimals(value: number): number { - return parseFloat(value.toFixed(3)); + const formattedValue = parseFloat(value.toFixed(3)); + return formattedValue === 0 ? 0 : formattedValue; } export const breakpoints = ['300px', '400px', '600px', '850px', '1280px', '1400px'];