Skip to content

Commit

Permalink
refactor(misskey-js): warnを除去 (misskey-dev#14520)
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih authored Sep 6, 2024
1 parent 567acea commit 0d0cd73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/misskey-js/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ export class APIClient {
): Promise<SwitchCaseResponseType<E, P>> {
return new Promise((resolve, reject) => {
let mediaType = 'application/json';
// (autogenがバグったときのため、念の為nullチェックも行う)
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.assertSpecialEpReqType(endpoint) && endpointReqTypes[endpoint] != null) {
mediaType = endpointReqTypes[endpoint];
}

let payload: FormData | string = '{}';

if (mediaType === 'application/json') {
Expand Down

0 comments on commit 0d0cd73

Please sign in to comment.