@infrab4a/connect-angular 5.7.5-beta.10 → 5.7.5-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1634,6 +1634,9 @@ class NewCategoryStructureAdapter {
|
|
|
1634
1634
|
.then((categories) => categories.map((category) => category.id.toString()));
|
|
1635
1635
|
}
|
|
1636
1636
|
async getCategory(category) {
|
|
1637
|
+
if ((category.isWishlist || category.isCollection) && Array.isArray(category.products)) {
|
|
1638
|
+
return category;
|
|
1639
|
+
}
|
|
1637
1640
|
const collectionCategory = category.isCollection ||
|
|
1638
1641
|
(isNil(category.isCollection) && !category.products?.length) ||
|
|
1639
1642
|
category.isWishlist ||
|
|
@@ -1721,6 +1724,18 @@ class CategorySearchStrategy {
|
|
|
1721
1724
|
throw new Error('Category is required for CategorySearchStrategy');
|
|
1722
1725
|
}
|
|
1723
1726
|
const fields = this.helpersService.getFieldsHelper().getStandardFields();
|
|
1727
|
+
if (category.isWishlist) {
|
|
1728
|
+
return this.searchDefault({
|
|
1729
|
+
category,
|
|
1730
|
+
filters,
|
|
1731
|
+
limits,
|
|
1732
|
+
shop,
|
|
1733
|
+
mainGender,
|
|
1734
|
+
sort: sort === 'most-relevant' ? 'best-sellers' : sort,
|
|
1735
|
+
optionsCache,
|
|
1736
|
+
fields,
|
|
1737
|
+
});
|
|
1738
|
+
}
|
|
1724
1739
|
if (sort === 'most-relevant') {
|
|
1725
1740
|
return this.searchWithMostRelevant({
|
|
1726
1741
|
category,
|