DEV Community

Discussion on: 6. Create a individual category page - Create a Commerce.js store with Svelte

Collapse
 
matthieugll profile image
Gelle Matthieu • Edited

Hi ! I had the same problem the tutorial is not up to date now we pass an array of slug and no longer a single slug here :

//behind
const { data: products } = await commerce.products.list({
      category_slug: slug,
    });
//after
const { data: products } = await commerce.products.list({
      category_slug: [slug],
    });
Enter fullscreen mode Exit fullscreen mode
Collapse
 
notrab profile image
Jamie Barton

Thanks for the update @matthieugll