From 24b9a6a38d2ec459d15f4d6a05b5fe7141775c7b Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Thu, 17 Oct 2019 08:41:53 -0400 Subject: [PATCH] fix a minor bug in the notification templates UI see: https://github.com/ansible/awx/issues/5029 --- .../notifications/shared/message-utils.service.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/awx/ui/client/src/notifications/shared/message-utils.service.js b/awx/ui/client/src/notifications/shared/message-utils.service.js index 48711e5faf..f49b96f0ed 100644 --- a/awx/ui/client/src/notifications/shared/message-utils.service.js +++ b/awx/ui/client/src/notifications/shared/message-utils.service.js @@ -60,27 +60,27 @@ export default [function() { return; } let isCustomized = false; - if (messages.started.message) { + if (messages.started && messages.started.message) { isCustomized = true; $scope.started_message = messages.started.message; } - if (messages.started.body) { + if (messages.started && messages.started.body) { isCustomized = true; $scope.started_body = messages.started.body; } - if (messages.success.message) { + if (messages.success && messages.success.message) { isCustomized = true; $scope.success_message = messages.success.message; } - if (messages.success.body) { + if (messages.success && messages.success.body) { isCustomized = true; $scope.success_body = messages.success.body; } - if (messages.error.message) { + if (messages.error && messages.error.message) { isCustomized = true; $scope.error_message = messages.error.message; } - if (messages.error.body) { + if (messages.error && messages.error.body) { isCustomized = true; $scope.error_body = messages.error.body; }