mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-09 23:48:41 +01:00
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:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user