datocms / plugins

Repository providing samples using the Plugins SDK
MIT License
33 stars 47 forks source link

FIX: normalise product assuming products have images #54

Closed isoadro closed 2 years ago

isoadro commented 2 years ago

I was running into an issue where a specific product wasn't showing up when using the modal search. I found that the normalizeProduct method was assuming that there was at least 1 image, which ended up throwing an error.

PR includes a default value for the imageUrl as well as a light bg colour if an image is not present.

stefanoverna commented 2 years ago

Thanks, shipped as datocms-plugin-shopify-product@0.1.4!