From 82a5a122088c586aa413d13139844c8276c567d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20D=27Eredit=C3=A0?= Date: Sun, 26 Jul 2026 14:12:20 +0200 Subject: [PATCH] refactor(constants): simplify `BOUNCE_THRESHOLD` parsing `parseInt(undefined, 10)` returns NaN and the `|| 1` fallback already covers it, so the `|| '1'` default was redundant. --- src/lib/constants.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/constants.ts b/src/lib/constants.ts index b3bf04505..5420bc6cc 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -1,8 +1,5 @@ export const CURRENT_VERSION = process.env.currentVersion; -export const BOUNCE_THRESHOLD = Math.max( - 1, - Number.parseInt(process.env.BOUNCE_THRESHOLD || '1', 10) || 1, -); +export const BOUNCE_THRESHOLD = Math.max(1, Number.parseInt(process.env.BOUNCE_THRESHOLD, 10) || 1); export const AUTH_TOKEN = 'umami.auth'; export const LOCALE_CONFIG = 'umami.locale'; export const TIMEZONE_CONFIG = 'umami.timezone';