1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-11-27 14:28:59 +09:00

refactor(misskey-js): warnを除去 (#14520)

This commit is contained in:
かっこかり 2024-09-07 02:38:01 +09:00 committed by GitHub
parent 567acea2a3
commit 0d0cd738f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,6 +67,8 @@ export class APIClient {
): Promise<SwitchCaseResponseType<E, P>> { ): Promise<SwitchCaseResponseType<E, P>> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let mediaType = 'application/json'; let mediaType = 'application/json';
// autogenがバグったときのため、念の為nullチェックも行う
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.assertSpecialEpReqType(endpoint) && endpointReqTypes[endpoint] != null) { if (this.assertSpecialEpReqType(endpoint) && endpointReqTypes[endpoint] != null) {
mediaType = endpointReqTypes[endpoint]; mediaType = endpointReqTypes[endpoint];
} }