handle query gallery with tags (#14633) (#14636)

* handle query gallery with tags

* fix typo
This commit is contained in:
Alan Ren
2021-03-10 16:10:42 -08:00
committed by GitHub
parent 41e756b906
commit 4772be5dcc

View File

@@ -608,6 +608,11 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
});
}
}
// ADS doesn't support extension tags, we need to return empty array to avoid breaking some scenarios. e.g. file extension based recommendations.
const tagFilters = query.criteria.filter(x => x.filterType === FilterType.Tag);
if (tagFilters?.length > 0) {
filteredExtensions = [];
}
const searchTexts = query.criteria.filter(x => x.filterType === FilterType.SearchText).map(v => v.value ? v.value.toLocaleLowerCase() : undefined);
if (searchTexts && searchTexts.length > 0) {
searchTexts.forEach(searchText => {