summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvanilson Junior <62117064+ivanilsonaraujojr@users.noreply.github.com>2023-08-30 21:37:28 +0200
committerGitHub <noreply@github.com>2023-08-30 21:37:28 +0200
commitcf1e448577a6349dc008ce48944bee46a3a25480 (patch)
treec2da9ab070a4532146a4404c063b2e19ebce21c0
parent[DOCS] tools/docker-compose/README.md: add way to solve postgresql issue (#14... (diff)
downloadawx-cf1e448577a6349dc008ce48944bee46a3a25480.tar.xz
awx-cf1e448577a6349dc008ce48944bee46a3a25480.zip
Fix undefined property error when task is of type yum/debug and was s… (#14372)
Signed-off-by: Ivanilson Junior <ivanilsonaraujojr@gmail.com>
-rw-r--r--awx/ui/src/screens/Job/JobOutput/HostEventModal.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/awx/ui/src/screens/Job/JobOutput/HostEventModal.js b/awx/ui/src/screens/Job/JobOutput/HostEventModal.js
index a7295c1692..a9199513b1 100644
--- a/awx/ui/src/screens/Job/JobOutput/HostEventModal.js
+++ b/awx/ui/src/screens/Job/JobOutput/HostEventModal.js
@@ -53,13 +53,9 @@ const getStdOutValue = (hostEvent) => {
const res = hostEvent?.event_data?.res;
let stdOut;
- if (taskAction === 'debug' && res.result && res.result.stdout) {
+ if (taskAction === 'debug' && res?.result?.stdout) {
stdOut = res.result.stdout;
- } else if (
- taskAction === 'yum' &&
- res.results &&
- Array.isArray(res.results)
- ) {
+ } else if (taskAction === 'yum' && Array.isArray(res?.results)) {
stdOut = res.results.join('\n');
} else if (res?.stdout) {
stdOut = Array.isArray(res.stdout) ? res.stdout.join(' ') : res.stdout;