fix(client): console error if latest version could not be retrieved

This commit is contained in:
Elian Doran 2025-02-08 10:50:55 +02:00
parent a2995ef267
commit f50f767e79
No known key found for this signature in database

View File

@ -606,7 +606,10 @@ function compareVersions(v1: string, v2: string): number {
/** /**
* Compares two semantic version strings and returns `true` if the latest version is greater than the current version. * Compares two semantic version strings and returns `true` if the latest version is greater than the current version.
*/ */
function isUpdateAvailable(latestVersion: string, currentVersion: string): boolean { function isUpdateAvailable(latestVersion: string | null | undefined, currentVersion: string): boolean {
if (!latestVersion) {
return false;
}
return compareVersions(latestVersion, currentVersion) > 0; return compareVersions(latestVersion, currentVersion) > 0;
} }