@gem-sdk/core 1.30.4 → 1.30.5

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.
@@ -2,7 +2,10 @@
2
2
 
3
3
  function checkInStock(variant) {
4
4
  if (!variant) return false;
5
- return variant?.inventoryQuantity && variant.inventoryQuantity > 0 || !variant?.manageInventory || variant.inventoryPolicy === 'CONTINUE';
5
+ return variant?.inventoryQuantity && variant.inventoryQuantity > 0 && !isDefaultVariant(variant) || !variant?.manageInventory || variant.inventoryPolicy === 'CONTINUE';
6
+ }
7
+ function isDefaultVariant(variant) {
8
+ return variant?.title === 'Default Title';
6
9
  }
7
10
 
8
11
  exports.checkInStock = checkInStock;
@@ -1,6 +1,9 @@
1
1
  function checkInStock(variant) {
2
2
  if (!variant) return false;
3
- return variant?.inventoryQuantity && variant.inventoryQuantity > 0 || !variant?.manageInventory || variant.inventoryPolicy === 'CONTINUE';
3
+ return variant?.inventoryQuantity && variant.inventoryQuantity > 0 && !isDefaultVariant(variant) || !variant?.manageInventory || variant.inventoryPolicy === 'CONTINUE';
4
+ }
5
+ function isDefaultVariant(variant) {
6
+ return variant?.title === 'Default Title';
4
7
  }
5
8
 
6
9
  export { checkInStock };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.30.4",
3
+ "version": "1.30.5",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",