1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Add check if list is an array before looping

This commit is contained in:
gconsidine 2017-07-24 16:50:19 -04:00
parent ce4eccc513
commit 20162014b7

View File

@ -41,6 +41,10 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', '
});
function assignCredentialKinds () {
if (!Array.isArray($scope[list.name])) {
return;
}
$scope[list.name].forEach(credential => {
credential.kind = credentialType.getById(credential.credential_type).name;
});