@nuskin/ns-shop 7.1.7 → 7.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/cart/cartService.js
CHANGED
|
@@ -426,6 +426,10 @@ async function addSkuToCart(options) {
|
|
|
426
426
|
response = await ProductService.getProductBySku(options),
|
|
427
427
|
product = response.success && response.product;
|
|
428
428
|
|
|
429
|
+
if (!response.success) {
|
|
430
|
+
throw new Error();
|
|
431
|
+
}
|
|
432
|
+
|
|
429
433
|
if (product &&
|
|
430
434
|
((options.isAdr === null || options.isAdr === undefined) ||
|
|
431
435
|
(options.isAdr === true && product.hasAdrOption()) ||
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {productLib} from '@nuskin/product-lib';
|
|
2
|
-
import {RunConfigService,
|
|
2
|
+
import {RunConfigService, UrlService, BrowserDetection} from '@nuskin/ns-util';
|
|
3
3
|
import { getConfiguration } from '@nuskin/configuration-sdk';
|
|
4
4
|
import {AccountManager} from '@nuskin/ns-account';
|
|
5
5
|
import {PriceType, Product} from '@nuskin/ns-product-lib';
|
|
@@ -250,7 +250,8 @@ const getProductDetail = async (options) => {
|
|
|
250
250
|
language: options.language
|
|
251
251
|
})
|
|
252
252
|
} catch (e) {
|
|
253
|
-
|
|
253
|
+
console.log(e);
|
|
254
|
+
response.data = {};
|
|
254
255
|
}
|
|
255
256
|
|
|
256
257
|
return extractProductData(response.data, options.sku);
|