Skip to content

Commit

Permalink
fix: [FIX] get product nullpointer on facetgetters
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMunizOdoo committed Mar 17, 2022
1 parent 945451a commit 7f9212d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const getCategoryTree = (searchData: SearchData): AgnosticCategoryTree => {
};

const getProducts = (searchData: SearchData): Product[] => {
if (!searchData?.data.products || searchData?.data.products.length === 0) {
if (!searchData?.data?.products || searchData?.data?.products?.length === 0) {
return [];
}

Expand Down

0 comments on commit 7f9212d

Please sign in to comment.