mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
fix(client): console error if latest version could not be retrieved
This commit is contained in:
parent
a2995ef267
commit
f50f767e79
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user