@open-tender/utils 0.1.129 → 0.1.131
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/dist/cjs/utils/cart.js +1 -1
- package/dist/esm/utils/cart.js +1 -1
- package/package.json +2 -2
package/dist/cjs/utils/cart.js
CHANGED
|
@@ -519,7 +519,7 @@ const addItem = (cart, item) => {
|
|
|
519
519
|
const itemSignature = (0, exports.makeCartItemSignature)(item);
|
|
520
520
|
const itemSignatures = cart.map(i => (Object.assign({ signature: (0, exports.makeCartItemSignature)(i) }, i)));
|
|
521
521
|
const match = itemSignatures.find(i => i.signature === itemSignature);
|
|
522
|
-
if (match && match.index) {
|
|
522
|
+
if (match && match.index !== undefined) {
|
|
523
523
|
const quantity = item.quantity + match.quantity;
|
|
524
524
|
const newItem = Object.assign(Object.assign({}, item), { quantity });
|
|
525
525
|
const updated = (0, exports.calcPrices)(newItem);
|
package/dist/esm/utils/cart.js
CHANGED
|
@@ -492,7 +492,7 @@ export const addItem = (cart, item) => {
|
|
|
492
492
|
const itemSignature = makeCartItemSignature(item);
|
|
493
493
|
const itemSignatures = cart.map(i => (Object.assign({ signature: makeCartItemSignature(i) }, i)));
|
|
494
494
|
const match = itemSignatures.find(i => i.signature === itemSignature);
|
|
495
|
-
if (match && match.index) {
|
|
495
|
+
if (match && match.index !== undefined) {
|
|
496
496
|
const quantity = item.quantity + match.quantity;
|
|
497
497
|
const newItem = Object.assign(Object.assign({}, item), { quantity });
|
|
498
498
|
const updated = calcPrices(newItem);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.131",
|
|
4
4
|
"description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"typescript": "^4.8.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@open-tender/types": "^0.2.
|
|
57
|
+
"@open-tender/types": "^0.2.62",
|
|
58
58
|
"@reduxjs/toolkit": "^1.8.5",
|
|
59
59
|
"react": "^18.2.0"
|
|
60
60
|
},
|