Skip to content

Commit

Permalink
core: frontend: InstalledExtensionCard: Fix Update
Browse files Browse the repository at this point in the history
* Fix has update availbale logic for case when stable is being used
  • Loading branch information
JoaoMario109 committed Jan 14, 2025
1 parent d2f3388 commit 5462d74
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ export default Vue.extend({
const current_version = new semver.SemVer(this.extension.tag)
// if is stable (which implies major >= 1), show latest stable
if (stable.is(this.extension.tag) && current_version.major > 0) {
return stable.max(versions) === this.extension.tag ? false : stable.max(versions)
const latest = stable.max(versions)
if (semver.compare(this.extension.tag, latest) >= 0) {
return false
}
return latest
}
// show the latest version regardless of stability
// eslint-disable-next-line no-extra-parens
Expand Down

0 comments on commit 5462d74

Please sign in to comment.