mirror of
https://github.com/ansible/awx.git
synced 2026-05-10 10:57:35 -02: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 () {
|
function assignCredentialKinds () {
|
||||||
|
if (!Array.isArray($scope[list.name])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$scope[list.name].forEach(credential => {
|
$scope[list.name].forEach(credential => {
|
||||||
credential.kind = credentialType.getById(credential.credential_type).name;
|
credential.kind = credentialType.getById(credential.credential_type).name;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user