Fix spaces in screen URLs
This commit is contained in:
parent
ff40ddd9af
commit
ee8ec669e4
|
@ -3,13 +3,14 @@ export default function (url) {
|
|||
.split("/")
|
||||
.map(part => {
|
||||
part = decodeURIComponent(part)
|
||||
part = part.replace(/ /g, "-")
|
||||
|
||||
// If parameter, then use as is
|
||||
if (!part.startsWith(":")) {
|
||||
part = encodeURIComponent(part)
|
||||
}
|
||||
|
||||
return part.replace(/ /g, "-")
|
||||
return part
|
||||
})
|
||||
.join("/")
|
||||
.toLowerCase()
|
||||
|
|
Loading…
Reference in New Issue