mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix chart upgrade screen by coercing the chart version to semver (#2584)
Signed-off-by: Marc Bachmann <marc.brookman@gmail.com>
This commit is contained in:
parent
9563ead2e6
commit
013057dc23
@ -34,7 +34,10 @@ export class HelmChartStore extends ItemStore<HelmChart> {
|
|||||||
|
|
||||||
protected sortVersions = (versions: IChartVersion[]) => {
|
protected sortVersions = (versions: IChartVersion[]) => {
|
||||||
return versions.sort((first, second) => {
|
return versions.sort((first, second) => {
|
||||||
return semver.compare(second.version, first.version);
|
const firstVersion = semver.coerce(first.version || 0);
|
||||||
|
const secondVersion = semver.coerce(second.version || 0);
|
||||||
|
|
||||||
|
return semver.compare(secondVersion, firstVersion);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user