From e4e17e969e6fae8fa4e17c954f5d04e25be109ce Mon Sep 17 00:00:00 2001 From: Leah Wagner Date: Sat, 23 Jan 2021 21:48:40 -0800 Subject: [PATCH] Remove filter to avoid additional computations as per https://github.com/vercel/commerce/pull/80#discussion_r531142893. Placeholder images will display as fallback. --- pages/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index 3dbb47ef7..586b8ef00 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -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