Skip to content

Commit 64b2142

Browse files
committed
Gatewayのset系関数でトレーリングスラッシュを削除する処理を追加
1 parent eee8a5c commit 64b2142

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/client/Gateway.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ export abstract class Gateway {
5555
* @return 何も返しません
5656
*/
5757
public setUrl (url: string): void {
58-
this.url = url;
58+
// トレーリングスラッシュを削除
59+
this.url = url.replace(/\/$/, '');
5960
}
6061

6162
/**
@@ -64,7 +65,8 @@ export abstract class Gateway {
6465
* @return 何も返しません
6566
*/
6667
public setVersion (version: string): void {
67-
this.version = version;
68+
// トレーリングスラッシュを削除
69+
this.version = version.replace(/\/$/, '');
6870
}
6971

7072
/**

0 commit comments

Comments
 (0)