DEV Community


Discussion on: Create a Next.js store with Commerce.js | Catalog pages

notrab profile image
Jamie Barton Author

To be honest this should be something more like if (products.length === 0) return null.

Basically all I'm doing here is making it so the component doesn't fail if no products are returned from Commerce.js - this hasn't really anything to do with SSR since it would fail there if products was undefined in its current state.

I hope that helps :)

christiankozalla profile image
Christian Kozalla

Alright, that makes sense. Thanks a lot!