From 5d940625817ec77f7beebbb8a760f6bf58a90c26 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 31 Mar 2023 09:20:52 +0900 Subject: [PATCH] lint fix --- packages/misskey-js/src/api.ts | 2 +- packages/misskey-js/src/streaming.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts index 17de317d19..974cb35ace 100644 --- a/packages/misskey-js/src/api.ts +++ b/packages/misskey-js/src/api.ts @@ -49,7 +49,7 @@ export class APIClient { this.credential = opts.credential; // ネイティブ関数をそのまま変数に代入して使おうとするとChromiumではIllegal invocationエラーが発生するため、 // 環境で実装されているfetchを使う場合は無名関数でラップして使用する - this.fetch = opts.fetch || ((...args) => fetch(...args)); + this.fetch = opts.fetch ?? ((...args) => fetch(...args)); } public request( diff --git a/packages/misskey-js/src/streaming.ts b/packages/misskey-js/src/streaming.ts index 9dd764952e..d97c2182fd 100644 --- a/packages/misskey-js/src/streaming.ts +++ b/packages/misskey-js/src/streaming.ts @@ -36,7 +36,7 @@ export default class Stream extends EventEmitter { WebSocket?: any; }) { super(); - options = options || { }; + options = options ?? { }; const query = urlQuery({ i: user?.token,