From 406cb07018c85c210a575c1b507c5e780cd64b97 Mon Sep 17 00:00:00 2001 From: mabashian Date: Tue, 12 Feb 2019 15:37:45 -0500 Subject: [PATCH] Prevent extra fetch of cred list as cred modal is closing --- .../multi-credential/multi-credential-modal.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/client/src/templates/job_templates/multi-credential/multi-credential-modal.directive.js b/awx/ui/client/src/templates/job_templates/multi-credential/multi-credential-modal.directive.js index e67a44a0b6..19e98d7ca3 100644 --- a/awx/ui/client/src/templates/job_templates/multi-credential/multi-credential-modal.directive.js +++ b/awx/ui/client/src/templates/job_templates/multi-credential/multi-credential-modal.directive.js @@ -117,7 +117,7 @@ function multiCredentialModalController(GetBasePath, qs, MultiCredentialService) })); const watchType = scope.$watch('credentialType', (newValue, oldValue) => { - if (newValue !== oldValue) { + if (newValue && newValue !== oldValue) { fetchCredentials(parseInt(newValue)); } });