fix: default POST request payloads to an empty object (#1141)
* defaulted carts.create payload to an empty object * fix linting * requested changes
This commit is contained in:
@@ -187,6 +187,10 @@ class Client {
|
||||
options: RequestOptions = {},
|
||||
customHeaders: Record<string, any> = {}
|
||||
): Promise<any> {
|
||||
if (method === "POST" && !payload) {
|
||||
payload = {}
|
||||
}
|
||||
|
||||
const reqOpts = {
|
||||
method,
|
||||
withCredentials: true,
|
||||
|
||||
Reference in New Issue
Block a user