diff --git a/src/assets/javascripts/utils.js b/src/assets/javascripts/utils.js index e5b8ba4..d81a96b 100644 --- a/src/assets/javascripts/utils.js +++ b/src/assets/javascripts/utils.js @@ -31,7 +31,8 @@ function protocolHost(url) { if (url.pathname == "/TekstoLibre/" && url.host.endsWith("github.io")) return `${url.protocol}//${url.host}${url.pathname.slice(0, -1)}` - return `${url.protocol}//${url.host}${url.pathname}` + const pathname = url.pathname != "/" ? url.pathname : "" + return `${url.protocol}//${url.host}${pathname}` } /**