mirror of
https://github.com/vercel/commerce.git
synced 2025-06-18 13:11:23 +00:00
Remove filter to avoid additional computations as per https://github.com/vercel/commerce/pull/80#discussion_r531142893. Placeholder images will display as fallback.
This commit is contained in:
parent
25129c699c
commit
e4e17e969e
@ -46,7 +46,6 @@ export async function getStaticProps({
|
||||
// Create a copy of products that we can mutate
|
||||
// Filter products that do not have images
|
||||
const products = [...newestProducts]
|
||||
.filter((p) => p.node.images.edges!.length > 0)
|
||||
// If the lists of featured and best selling products don't have enough
|
||||
// products, then fill them with products from the products list, this
|
||||
// is useful for new commerce sites that don't have a lot of products
|
||||
|
Loading…
x
Reference in New Issue
Block a user