1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Return empty string if Helm release version is not detected (#342)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2020-05-05 07:28:54 +03:00 committed by GitHub
parent 8d2e8bbe62
commit dd8dc23514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,7 +170,12 @@ export class HelmRelease implements ItemObject {
}
getVersion() {
return this.chart.match(/(\d+)[^-]*$/)[0];
const versions = this.chart.match(/(\d+)[^-]*$/)
if (versions) {
return versions[0]
} else {
return ""
}
}
getUpdated(humanize = true, compact = true) {