YoannBuzenet / MBI-Front-End

React.js Stateless - Company software that allows shops to automatize their product sourcing by setting automatic buying price (on more than 20,000 products) depending on market trends. We provide data via our centralized API each React app can call, and then post it automatically on a marketplace through their API.
0 stars 0 forks source link

SearchBar plante si le nom est incorrect #7

Closed YoannBuzenet closed 4 years ago

YoannBuzenet commented 4 years ago

Permettre à la Searchbar d'avoir un résultat nul

YoannBuzenet commented 4 years ago

Corrected - the Serach Bar was initializing its filerting array with data[0] of the API response - but if it was empty, it was feeding the array with undefined, causing .map to trigger on undefined.

Added if statement to protect to array feeding, works ok now.