@nuskin/ns-shop 5.19.5 → 5.19.7

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-shop",
3
- "version": "5.19.5",
3
+ "version": "5.19.7",
4
4
  "description": "The description that will amaze and astound your audience when they read it",
5
5
  "main": "src/shop.js",
6
6
  "scripts": {
@@ -328,7 +328,7 @@ function itemIsAvailable(product) {
328
328
  async function addProductToCart(options) {
329
329
  let cart = _getCart();
330
330
 
331
- if (!itemIsAvailable(options.product)) {
331
+ if (!options.sapLineId && !itemIsAvailable(options.product)) {
332
332
  throw new NsProductNotReleasedForSale('This product is not released for sale');
333
333
  }
334
334
 
@@ -1305,7 +1305,7 @@ function checkContext(params){
1305
1305
  if (context === 'skin_consult'){
1306
1306
  return params.isMySite
1307
1307
  } else {
1308
- return params.isMySite || window.location.href.search(/\bmysite\b/) >= 0;
1308
+ return typeof params.isMySite === 'boolean' ? params.isMySite : window.location.href.search(/\bmysite\b/) >= 0;
1309
1309
  }
1310
1310
  }
1311
1311