handle query gallery with tags (#14633)

* handle query gallery with tags

* fix typo
This commit is contained in:
Alan Ren
2021-03-09 19:19:48 -08:00
committed by GitHub
parent c33116c625
commit c05ba883c4

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 => {