diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2019-02-04 02:14:18 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-04 02:14:18 +0900 |
| commit | c7e8c27ce6652b64a55d7d5ea85c66b4a1cbc06c (patch) | |
| tree | 0110935e700756d29a0bf3941ec511f9042cf41c /src/config | |
| parent | Update load.ts (diff) | |
| download | misskey-c7e8c27ce6652b64a55d7d5ea85c66b4a1cbc06c.tar.gz misskey-c7e8c27ce6652b64a55d7d5ea85c66b4a1cbc06c.tar.bz2 misskey-c7e8c27ce6652b64a55d7d5ea85c66b4a1cbc06c.zip | |
Fix bug
C#っぽく使ってしまっていた。
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/load.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config/load.ts b/src/config/load.ts index 1cec3b1485..c0b966d531 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -57,7 +57,7 @@ function tryCreateUrl(url: string) { function validateUrl(url: string) { const result = tryCreateUrl(url); - if (result.pathname.trim('/').length) throw `url="${url}" is not a valid URL, has a pathname.`; + if (result.pathname.replace('/', '').length) throw `url="${url}" is not a valid URL, has a pathname.`; if (!url.includes(result.host)) throw `url="${url}" is not a valid URL, has an invalid hostname.`; if (!/^https?:$/.test(result.protocol)) throw `url="${url}" is not a valid URL, has an invalid protocol.`; return result; |