Do not try to compare component version when remote version info is not available

Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser
2026-02-23 13:27:10 +01:00
parent 73ceadac37
commit 81623fc1bf

View File

@@ -516,9 +516,12 @@ function updateVersionInfo() {
'" rel="noopener noreferrer" target="_blank">' +
localVersion +
"</a>";
if (versionCompare(v.local, v.remote) === -1) {
// Update available
updateComponentAvailable = true;
if (v.remote == null) {
// No remote version available, we cannot determine if an update is available
updateComponentAvailable = false;
} else if (versionCompare(v.local, v.remote) === -1) {
// Update available
updateComponentAvailable = true;
}
} else {
// non-master branch
@@ -533,7 +536,11 @@ function updateVersionInfo() {
}
if (v.name === "Docker Tag") {
if (versionCompare(v.local, v.remote) === -1) {
if (v.remote === null) {
// No remote version available, we cannot determine if an update is available
updateComponentAvailable = false;
dockerUpdate = false;
} else if (versionCompare(v.local, v.remote) === -1) {
// Display update information for the docker tag
updateComponentAvailable = true;
dockerUpdate = true;