Skip to content

Commit 0e3f281

Browse files
Fixed query methods
1 parent 0c9c538 commit 0e3f281

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Source/Request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async function request < Data extends FormData | object > (
2020
const body = ( isForm )
2121
? data : JSON.stringify(data)
2222

23-
if( isForm )
23+
if( ! isForm )
2424
request = new Request(request,withJSON)
2525

2626
request = new Request(request,{ body })

Source/Requests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const { root } = window.Shopify.routes
77

88
const withJSON = {
99
headers : {
10-
'Content-Type' : 'application/json'
10+
'Content-Type' : 'application/json' as const
1111
}
1212
}
1313

1414
const asPost = { method : 'POST' }
1515

1616

1717
const Query = new Request
18-
( root + `cart.js` , asPost )
18+
( root + `cart.js` )
1919

2020
const Clear = new Request
2121
( root + `cart/clear.js` , asPost )

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@doomcommerce/shopify-theme-cart",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "Shopify theme cart API typings & wrappers",
55
"type" : "module",
66

0 commit comments

Comments
 (0)