From c7e8c27ce6652b64a55d7d5ea85c66b4a1cbc06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Mon, 4 Feb 2019 02:14:18 +0900 Subject: [PATCH] Fix bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C#っぽく使ってしまっていた。 --- src/config/load.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/load.ts b/src/config/load.ts index 1cec3b148..c0b966d53 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;