DEV Community

[Comment from a deleted post]
Collapse
 
notrab profile image
Jamie Barton

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 :)

Collapse
 
christiankozalla profile image
Christian Kozalla

Alright, that makes sense. Thanks a lot!