From 234d91a8846f3ad204bb019f8a7693992593690f Mon Sep 17 00:00:00 2001 From: FineArchs <133759614+FineArchs@users.noreply.github.com> Date: Mon, 16 Dec 2024 08:55:34 +0900 Subject: [PATCH] =?UTF-8?q?misskey-js:=20APIClient=E3=81=ABURL=E6=9C=AB?= =?UTF-8?q?=E5=B0=BE=E3=81=AE/=E3=82=92=E9=99=A4=E5=8E=BB=E3=81=99?= =?UTF-8?q?=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD=E5=8A=A0=20(#1513?= =?UTF-8?q?2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/misskey-js/src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts index ed1282957fbe..e663d712a7bd 100644 --- a/packages/misskey-js/src/api.ts +++ b/packages/misskey-js/src/api.ts @@ -44,7 +44,7 @@ export class APIClient { credential?: APIClient['credential']; fetch?: APIClient['fetch'] | null | undefined; }) { - this.origin = opts.origin; + this.origin = opts.origin.replace(/\/$/, ''); this.credential = opts.credential; // ネイティブ関数をそのまま変数に代入して使おうとするとChromiumではIllegal invocationエラーが発生するため、 // 環境で実装されているfetchを使う場合は無名関数でラップして使用する