disable unknown fields

This commit is contained in:
Zaiste 2021-04-19 15:39:14 +02:00
parent 5402af4902
commit de1f3259f0
No known key found for this signature in database
GPG Key ID: 15DF7EBC7F2FFE35

View File

@ -46,12 +46,13 @@ export const handler: SWRHook<
if (categoryId) { if (categoryId) {
edges = data.node?.products?.edges ?? [] edges = data.node?.products?.edges ?? []
if (brandId) { // FIXME @zaiste, no `vendor` in Saleor
edges = edges.filter( // if (brandId) {
({ node: { vendor } }: ProductEdge) => // edges = edges.filter(
vendor.replace(/\s+/g, '-').toLowerCase() === brandId // ({ node: { vendor } }: ProductCountableEdge) =>
) // vendor.replace(/\s+/g, '-').toLowerCase() === brandId
} // )
// }
} else { } else {
edges = data.products?.edges ?? [] edges = data.products?.edges ?? []
} }