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".
This commit is contained in:
Gauvino
2026-06-09 16:29:34 +02:00
parent 64105a8bac
commit f1ea2830a8

View File

@@ -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";
}