Skip to content

Commit

Permalink
Fixed last slash bug when adding a custom instance #996
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Sep 15, 2024
1 parent ef4bc14 commit ae3ae00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/assets/javascripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
}

/**
Expand Down

0 comments on commit ae3ae00

Please sign in to comment.