diff --git a/js/ui/search.js b/js/ui/search.js index 804be9593..396674107 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -226,6 +226,12 @@ var SearchResultsBase = new Lang.Class({ this._cancellable.reset(); this.provider.getResultMetas(metasNeeded, metas => { + if (this._cancellable.is_cancelled()) { + if (metas.length > 0) + log(`Search provider ${this.provider.id} returned results after the request was canceled`); + callback(false); + return; + } if (metas.length != metasNeeded.length) { log('Wrong number of result metas returned by search provider ' + this.provider.id + ': expected ' + metasNeeded.length + ' but got ' + metas.length);