mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 21:51:21 +00:00
disable unknown fields
This commit is contained in:
parent
5402af4902
commit
de1f3259f0
@ -46,12 +46,13 @@ export const handler: SWRHook<
|
||||
|
||||
if (categoryId) {
|
||||
edges = data.node?.products?.edges ?? []
|
||||
if (brandId) {
|
||||
edges = edges.filter(
|
||||
({ node: { vendor } }: ProductEdge) =>
|
||||
vendor.replace(/\s+/g, '-').toLowerCase() === brandId
|
||||
)
|
||||
}
|
||||
// FIXME @zaiste, no `vendor` in Saleor
|
||||
// if (brandId) {
|
||||
// edges = edges.filter(
|
||||
// ({ node: { vendor } }: ProductCountableEdge) =>
|
||||
// vendor.replace(/\s+/g, '-').toLowerCase() === brandId
|
||||
// )
|
||||
// }
|
||||
} else {
|
||||
edges = data.products?.edges ?? []
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user