We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 003ddb4 commit c52c526Copy full SHA for c52c526
1 file changed
src/hooks/useCart.ts
@@ -123,9 +123,7 @@ export function useAddToCart() {
123
let nextLines: CartDetail['lines']['nodes']
124
if (existingIdx >= 0) {
125
nextLines = previous.lines.nodes.map((l, i) =>
126
- i === existingIdx
127
- ? { ...l, quantity: l.quantity + quantity }
128
- : l,
+ i === existingIdx ? { ...l, quantity: l.quantity + quantity } : l,
129
)
130
} else {
131
const lineTotal = String(Number(snap.price.amount) * quantity)
0 commit comments