rerobe-js-orm 2.7.33 → 2.7.34

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.
@@ -91,7 +91,7 @@ class ReRobeProductHelpers {
91
91
  const products = Array.isArray(arrayLike) ? arrayLike : [arrayLike];
92
92
  return products.reduce((acc, cur) => {
93
93
  const commission = cur.reRobeCommission ? Number(this.commissionFixer(cur.reRobeCommission)) : 0.5;
94
- const priceToUse = cur.isOnSale === 'yes' && cur.salePrice ? cur.salePrice : cur.price;
94
+ const priceToUse = cur.isOnSale === 'yes' && Boolean(cur.clearanceTimestamp) && cur.salePrice ? cur.salePrice : cur.price;
95
95
  const listingPrice = Number.isNaN(priceToUse) ? 0 : Number(priceToUse);
96
96
  const priceSold = acc[0] + listingPrice;
97
97
  const commissionFee = acc[1] + priceSold * commission;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "2.7.33",
3
+ "version": "2.7.34",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",