Improve kql error message handling and avoid fetcihng twice (#54239) (#55981)

This commit is contained in:
Joe Reuter 2020-01-27 14:19:01 +01:00 committed by GitHub
parent a7685a6861
commit 84311624bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -688,7 +688,9 @@ function discoverController(
$scope.$watch('state.query', (newQuery, oldQuery) => {
if (!_.isEqual(newQuery, oldQuery)) {
const query = migrateLegacyQuery(newQuery);
$scope.updateQueryAndFetch({ query });
if (!_.isEqual(query, newQuery)) {
$scope.updateQueryAndFetch({ query });
}
}
});