@nuskin/ns-product-lib 2.17.0-cx24-5822.4 → 2.17.0-cx24-5822.6
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
package/src/graph-ql/product.js
CHANGED
@@ -116,7 +116,10 @@ async function getProducts(ids, market, locale, config) {
|
|
116
116
|
try {
|
117
117
|
const { data } = await graphQlHttpRequest(payload, config);
|
118
118
|
|
119
|
-
if (data && data.data &&
|
119
|
+
if (data && data.data &&
|
120
|
+
data.data.productsById &&
|
121
|
+
data.data.productsById.products &&
|
122
|
+
data.data.productsById.products.length) {
|
120
123
|
|
121
124
|
//use to get default variant based on requested sku
|
122
125
|
productsData.products = data.data.productsById.products.map((product,index)=>{
|