From 20162014b757a32352e18b930c2d683e0ac38c15 Mon Sep 17 00:00:00 2001 From: gconsidine Date: Mon, 24 Jul 2017 16:50:19 -0400 Subject: [PATCH] Add check if list is an array before looping --- .../src/credentials/list/credentials-list.controller.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/ui/client/src/credentials/list/credentials-list.controller.js b/awx/ui/client/src/credentials/list/credentials-list.controller.js index a160bfa40e..30acfc38c5 100644 --- a/awx/ui/client/src/credentials/list/credentials-list.controller.js +++ b/awx/ui/client/src/credentials/list/credentials-list.controller.js @@ -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; });