Fix version check on next (#3340)

Closes #3318
This commit is contained in:
Lukas 2024-02-07 02:10:36 +01:00 committed by GitHub
parent 5cedc956e9
commit c746857830
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -81,11 +81,18 @@ export function useVersion() {
}
}
let needsUpdate = false;
if (usesNext) {
needsUpdate = latest !== current;
} else if (latest !== undefined && currentSemver !== null) {
needsUpdate = semverGt(latest, currentSemver);
}
version.value = {
latest,
current,
currentShort: usesNext ? 'next' : current,
needsUpdate: latest !== undefined && currentSemver !== null && semverGt(latest, currentSemver),
needsUpdate,
usesNext,
};
});