From 0d0cd738f85b662d57687e6d7ef198993cc5d322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 7 Sep 2024 02:38:01 +0900 Subject: [PATCH] =?UTF-8?q?refactor(misskey-js):=20warn=E3=82=92=E9=99=A4?= =?UTF-8?q?=E5=8E=BB=20(#14520)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/misskey-js/src/api.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts index 659a29a221..ed1282957f 100644 --- a/packages/misskey-js/src/api.ts +++ b/packages/misskey-js/src/api.ts @@ -67,10 +67,12 @@ export class APIClient { ): Promise> { 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') {