Skip to content

Commit

Permalink
bitbucket Driver: body can be undefined (#962)
Browse files Browse the repository at this point in the history
* body can be undefined

* Update src/drivers/bitbucket_cloud.js

Co-authored-by: Helio Machado <[email protected]>

Co-authored-by: Helio Machado <[email protected]>
  • Loading branch information
dacbd and 0x2b3bfa0 authored Apr 14, 2022
1 parent 6fb4c10 commit 99c0f94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/bitbucket_cloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class BitbucketCloud {
throw new Error('Bitbucket Cloud API endpoint not found');

const headers = { Authorization: `Basic ${token}` };
if (body.constructor !== FormData)
if (!body || body.constructor !== FormData)
headers['Content-Type'] = 'application/json';

const requestUrl = url || `${api}${endpoint}`;
Expand Down

3 comments on commit 99c0f94

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

Please sign in to comment.