From fd7e4695a5353e37156b0bae9bca0e0ff9978ff9 Mon Sep 17 00:00:00 2001 From: Liza Katz Date: Mon, 6 May 2019 18:48:07 +0300 Subject: [PATCH] Fixed discover subscription --- .../kibana/public/discover/controllers/discover.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js b/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js index 1331dceae7fa2..c9274c5a2589c 100644 --- a/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js +++ b/src/legacy/core_plugins/kibana/public/discover/controllers/discover.js @@ -564,7 +564,7 @@ function discoverController( queryFilter.getUpdates$().subscribe({ next: () => { $scope.filters = queryFilter.getFilters(); - return $scope.updateDataSource().then(function () { + $scope.updateDataSource().then(function () { $state.save(); }); } @@ -577,7 +577,9 @@ function discoverController( // fetch data when filters fire fetch event queryFilter.getFetches$().subscribe({ - next: () => $scope.fetch + next: () => { + $scope.fetch(); + } }); $scope.$watch('opts.timefield', function (timefield) {