From 008c6a0e19a1c9e130152a6082c574057c841f89 Mon Sep 17 00:00:00 2001 From: igoristic Date: Mon, 7 Dec 2020 11:24:44 -0500 Subject: [PATCH] Safegaurding alerts in case they come back undefined (#85108) --- x-pack/plugins/monitoring/public/views/base_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/monitoring/public/views/base_controller.js b/x-pack/plugins/monitoring/public/views/base_controller.js index 62c15f0913569..bc888b5c9ff1a 100644 --- a/x-pack/plugins/monitoring/public/views/base_controller.js +++ b/x-pack/plugins/monitoring/public/views/base_controller.js @@ -168,7 +168,7 @@ export class MonitoringViewBaseController { $scope.$apply(() => { this._isDataInitialized = true; // render will replace loading screen with the react component $scope.pageData = this.data = pageData.value; // update the view's data with the fetch result - $scope.alerts = this.alerts = alerts.value || {}; + $scope.alerts = this.alerts = alerts && alerts.value ? alerts.value : {}; }); }); };