mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-07-29 00:38:44 +00:00
Fix case of double slash
This commit is contained in:
@@ -13,7 +13,10 @@ const placeholder =
|
||||
const getProtectedUrl = (url?: string) => {
|
||||
if (url == undefined) return undefined
|
||||
|
||||
const imgUrl = new URL(`${import.meta.env.BASE_URL}/${url}`, location.origin)
|
||||
const imgUrl = new URL(
|
||||
`${import.meta.env.BASE_URL}${url}`.replace(/\/\//g, '/'),
|
||||
location.origin
|
||||
)
|
||||
|
||||
const tokenRegex = location.pathname.match(/^\/share\/([\d\w]+)(\/?.*)$/)
|
||||
if (tokenRegex) {
|
||||
|
||||
Reference in New Issue
Block a user