forked from crowetic/commerce
Update use-add-item.tsx
This commit is contained in:
parent
ce5fcb6975
commit
e1be0ac37d
@ -14,7 +14,9 @@ export const handler: MutationHandler<Cart, {}, AddCartItemBody> = {
|
|||||||
fetchOptions: {
|
fetchOptions: {
|
||||||
query: checkoutLineItemAddMutation,
|
query: checkoutLineItemAddMutation,
|
||||||
},
|
},
|
||||||
async fetcher({ input: { item }, options, fetch }) {
|
async fetcher({ input, options, fetch }) {
|
||||||
|
const item = input?.item ?? input
|
||||||
|
|
||||||
if (
|
if (
|
||||||
item.quantity &&
|
item.quantity &&
|
||||||
(!Number.isInteger(item.quantity) || item.quantity! < 1)
|
(!Number.isInteger(item.quantity) || item.quantity! < 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user