Check to make sure vm.promptData.launchConf.passwords_needed_to_start exists before looping

This commit is contained in:
mabashian
2018-04-11 11:09:01 -04:00
parent 0459043b8e
commit 3dd9ca3fb6

View File

@@ -67,6 +67,7 @@ export default [ 'Rest', 'GetBasePath', 'ProcessErrors', 'CredentialTypeModel',
vm.promptData.prompts.credentials.passwords = {}; vm.promptData.prompts.credentials.passwords = {};
if(vm.promptData.launchConf.passwords_needed_to_start) {
vm.promptData.launchConf.passwords_needed_to_start.forEach((passwordNeeded) => { vm.promptData.launchConf.passwords_needed_to_start.forEach((passwordNeeded) => {
if(passwordNeeded === "ssh_password") { if(passwordNeeded === "ssh_password") {
vm.promptData.prompts.credentials.passwords.ssh = {}; vm.promptData.prompts.credentials.passwords.ssh = {};
@@ -92,6 +93,7 @@ export default [ 'Rest', 'GetBasePath', 'ProcessErrors', 'CredentialTypeModel',
}); });
} }
}); });
}
vm.promptData.credentialTypeMissing = []; vm.promptData.credentialTypeMissing = [];