Handle gitVersion check when cluster is provisioning

if the cluster is provisioning the git version will be undefined
This commit is contained in:
Westly Wright 2020-09-28 10:10:50 -07:00
parent b95399afeb
commit 24ac9d0721
No known key found for this signature in database
GPG Key ID: 4FAB3D8673DC54A3
1 changed files with 7 additions and 3 deletions

View File

@ -183,10 +183,14 @@ export default Component.extend(NewOrEdit, {
showWindowsWarning: computed('scope.currentCluster.version.gitVersion', 'scope.currentCluster.isWindows', function() {
const { scope: { currentCluster } } = this;
const currentVersion = Semver.coerce(currentCluster.version.gitVersion);
if (currentCluster.isWindows && currentCluster.isVxlan && Semver.lt(currentVersion, MIN_WINDOWS_NO_WARNING)) {
return true;
try {
const currentVersion = Semver.coerce(currentCluster.version.gitVersion);
if (currentCluster.isWindows && currentCluster.isVxlan && Semver.lt(currentVersion, MIN_WINDOWS_NO_WARNING)) {
return true;
}
} catch (error) {
}
return false;