mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 01:38:50 -03:30
Add check if list is an array before looping
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user