From 7cabdb4174a00db7284d91d8b14da2b7ec5b29f3 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;