diff --git a/x-pack/plugins/ml/public/explorer/__tests__/explorer_controller.js b/x-pack/plugins/ml/public/explorer/__tests__/explorer_controller.js index 40109b4c329ff..671cf0fea1b7b 100644 --- a/x-pack/plugins/ml/public/explorer/__tests__/explorer_controller.js +++ b/x-pack/plugins/ml/public/explorer/__tests__/explorer_controller.js @@ -19,6 +19,7 @@ describe('ML - Explorer Controller', () => { const scope = $rootScope.$new(); $controller('MlExplorerController', { $scope: scope }); + expect(Array.isArray(scope.anomalyChartRecords)).to.be(true); expect(scope.loading).to.be(true); }); }); diff --git a/x-pack/plugins/ml/public/explorer/explorer_controller.js b/x-pack/plugins/ml/public/explorer/explorer_controller.js index a2bd37981bc82..e142ce0f8e3ab 100644 --- a/x-pack/plugins/ml/public/explorer/explorer_controller.js +++ b/x-pack/plugins/ml/public/explorer/explorer_controller.js @@ -81,6 +81,7 @@ module.controller('MlExplorerController', function ( mlSelectIntervalService, mlSelectSeverityService) { + $scope.anomalyChartRecords = []; $scope.timeFieldName = 'timestamp'; $scope.loading = true; timefilter.enableTimeRangeSelector();