Skip to content

Commit 3469eb9

Browse files
committed
Update useProductsStore.js
1 parent 411571d commit 3469eb9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

store/useProductsStore.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ export const useProductsStore = defineStore("products", {
2626
products = products.filter((product) => {
2727
const productCategories =
2828
product.productCategories?.nodes.map((cat) =>
29-
cat.name.toLowerCase()
29+
cat.name.toLowerCase(),
3030
) || [];
31-
return selectedTypes.some((type) =>
32-
productCategories.includes(type)
33-
);
31+
return selectedTypes.some((type) => productCategories.includes(type));
3432
});
3533
}
3634

@@ -59,7 +57,9 @@ export const useProductsStore = defineStore("products", {
5957
});
6058
},
6159
getUniqueProductTypes(state) {
62-
const productTypes = state.products.flatMap((p) => p.productCategories.nodes);
60+
const productTypes = state.products.flatMap(
61+
(p) => p.productCategories.nodes,
62+
);
6363
const unique = [];
6464
const map = new Map();
6565
for (const item of productTypes) {

0 commit comments

Comments
 (0)