1
0
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:
Marc Bachmann 2021-04-21 21:13:22 +02:00 committed by GitHub
parent 9563ead2e6
commit 013057dc23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,10 @@ export class HelmChartStore extends ItemStore<HelmChart> {
protected sortVersions = (versions: IChartVersion[]) => {
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);
});
};