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 authored and GitHub committed 2021-04-21 15:13:22 -04:00
1 parent 9563ead2e6
commit 013057dc23
1 file changed
+4 -1
@@ -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);
});
};