Skip to content

Commit

Permalink
chore: remove unnecessary optional operator
Browse files Browse the repository at this point in the history
  • Loading branch information
zaida04 authored Oct 2, 2022
1 parent bb26b22 commit 728018c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/webhook-client/lib/WebhookClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class WebhookClient {
let body: FormData | RESTPostWebhookBody = baseBody;
const formData = new FormData();
if (resFiles?.length) {
resFiles?.forEach((value, index) => formData.append(`files[${index}]`, value.content, { filename: value.name, filepath: value.path }));
resFiles.forEach((value, index) => formData.append(`files[${index}]`, value.content, { filename: value.name, filepath: value.path }));
formData.append("payload_json", JSON.stringify(baseBody), { contentType: "application/json" });
body = formData;
}
Expand Down

0 comments on commit 728018c

Please sign in to comment.