diff --git a/src/api.ts b/src/api.ts index 12f5a0b21c..33f6e7b690 100644 --- a/src/api.ts +++ b/src/api.ts @@ -46,7 +46,9 @@ export class APIClient { }) { this.origin = opts.origin; this.credential = opts.credential; - this.fetch = opts.fetch || fetch; + // ネイティブ関数をそのまま変数に代入して使おうとするとChromiumではIllegal invocationエラーが発生するため、 + // 環境で実装されているfetchを使う場合は無名関数でラップして使用する + this.fetch = opts.fetch || ((...args) => fetch(...args)); } public request(