From 23b836252a3570070203686d3d46bbf8ef958f59 Mon Sep 17 00:00:00 2001 From: andr-ew Date: Sat, 24 Jun 2023 17:48:54 -0500 Subject: [PATCH] fix build error: the provided export path doesn't match the page --- app/(home)/search/[collection]/page.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/(home)/search/[collection]/page.js b/app/(home)/search/[collection]/page.js index f03932240..586ef3925 100644 --- a/app/(home)/search/[collection]/page.js +++ b/app/(home)/search/[collection]/page.js @@ -5,7 +5,13 @@ import { HomeProductsList } from '/components/home.js'; export async function generateStaticParams() { const collections = await getCollections(); - return collections.map(collection => ({ collection: collection.handle })); + const params = collections + .map(collection => ({ + collection: collection.handle, + })) + .filter(param => param.collection.length > 0); + + return params; } export default async function CollectionPage({ params: { collection } }) {