Poprawki bugów
This commit is contained in:
@@ -246,7 +246,7 @@ async function idmGetHotspotData(query, graphFn){
|
||||
});
|
||||
const data = await res.json();
|
||||
const products = graphFn === IDM_HOTSPOTS_GQL ? data?.data?.hotspots?.products : data?.data?.products?.products;
|
||||
if(!products) throw new Error(idmHotspotTextObject["Nie znaleziono produktów"]);
|
||||
if(!products || !products.length) throw new Error(idmHotspotTextObject["Nie znaleziono produktów"]);
|
||||
|
||||
console.log(data);
|
||||
return products;
|
||||
|
||||
Reference in New Issue
Block a user