fix build error: the provided export path doesn't match the page

This commit is contained in:
andr-ew 2023-06-24 17:48:54 -05:00
parent f7969b87e1
commit 23b836252a

View File

@ -5,7 +5,13 @@ import { HomeProductsList } from '/components/home.js';
export async function generateStaticParams() { export async function generateStaticParams() {
const collections = await getCollections(); 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 } }) { export default async function CollectionPage({ params: { collection } }) {