From f1ea2830a89204e5a5e92a142a0ca87b1ab9fe2a Mon Sep 17 00:00:00 2001 From: Gauvino Date: Tue, 9 Jun 2026 16:29:34 +0200 Subject: [PATCH] fix(settings): avoid "null (build)" when version is unavailable CodeRabbit: in the production tier, a null version + present build produced "null (42)". Guard the template (version && build) and fall back to the build number alone, then "N/A". --- utils/version.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/version.ts b/utils/version.ts index c8cfc3e64..79ba2c1bf 100644 --- a/utils/version.ts +++ b/utils/version.ts @@ -68,7 +68,8 @@ export function getVersionInfo(): VersionInfo { if (isDev) { display = [version ?? "dev", branch, commit].filter(Boolean).join(" · "); } else if (isProduction) { - display = build ? `${version} (${build})` : (version ?? "N/A"); + display = + version && build ? `${version} (${build})` : (version ?? build ?? "N/A"); } else { display = [version, commit].filter(Boolean).join(" · ") || version || "N/A"; }