fix comparison (#15176)

This fixes the labs behavior.
This commit is contained in:
Thomas Neirynck 2017-11-28 10:39:53 -05:00 committed by GitHub
parent 4f69c7a4b8
commit 50a53729ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ export function VisualizeListingController($injector) {
this.totalItems = result.total;
this.showLimitError = result.total > config.get('savedObjects:listingLimit');
this.listingLimit = config.get('savedObjects:listingLimit');
return result.hits.filter(result => (isLabsEnabled || !result.type.stage === 'lab'));
return result.hits.filter(result => (isLabsEnabled || result.type.stage !== 'lab'));
});
};

View file

@ -267,7 +267,7 @@ module.directive('savedObjectFinder', function ($location, $injector, kbnUrl, Pr
self.service.find(filter)
.then(function (hits) {
hits.hits = hits.hits.filter((hit) => (isLabsEnabled || !hit.type.stage === 'lab'));
hits.hits = hits.hits.filter((hit) => (isLabsEnabled || hit.type.stage !== 'lab'));
hits.total = hits.hits.length;
// ensure that we don't display old results