summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2019-02-04 02:14:18 +0900
committerGitHub <noreply@github.com>2019-02-04 02:14:18 +0900
commitc7e8c27ce6652b64a55d7d5ea85c66b4a1cbc06c (patch)
tree0110935e700756d29a0bf3941ec511f9042cf41c /src/config
parentUpdate load.ts (diff)
downloadmisskey-c7e8c27ce6652b64a55d7d5ea85c66b4a1cbc06c.tar.gz
misskey-c7e8c27ce6652b64a55d7d5ea85c66b4a1cbc06c.tar.bz2
misskey-c7e8c27ce6652b64a55d7d5ea85c66b4a1cbc06c.zip
Fix bug
C#っぽく使ってしまっていた。
Diffstat (limited to 'src/config')
-rw-r--r--src/config/load.ts2
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;