From 94b5bb8cf9e3d6380e4f075738c5829211e44574 Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 31 Jul 2019 14:15:13 -0400 Subject: [PATCH] Ensure variable exists before calling toString on it to fix js error thrown when creating grafana notification --- awx/ui/client/src/notifications/add/add.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/client/src/notifications/add/add.controller.js b/awx/ui/client/src/notifications/add/add.controller.js index 3197dd310c..4f002cedbb 100644 --- a/awx/ui/client/src/notifications/add/add.controller.js +++ b/awx/ui/client/src/notifications/add/add.controller.js @@ -199,7 +199,7 @@ export default ['Rest', 'Wait', 'NotificationsFormObject', $scope[i] = null; } else { - $scope[i] = $scope[i].toString().split('\n'); + $scope[i] = $scope[i] ? $scope[i].toString().split('\n') : ""; } } if (field.type === 'checkbox') {