I had the same error and solved it by first asking if the array existed.
Example:
<Filter>
{ product.color?.map((c) => (
<FilterColor color = {c} key = {c} />
))};
</Filter>
I had the same error and solved it by first asking if the array existed.
Example:
<Filter>
{ product.color?.map((c) => (
<FilterColor color = {c} key = {c} />
))};
</Filter>