Explorar el Código

Fix the bug of automatically appending basepath to image resource. (#24201)

tags/1.8.0
17hz hace 2 meses
padre
commit
f0684c1957
No account linked to committer's email address
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      web/app/routePrefixHandle.tsx

+ 1
- 1
web/app/routePrefixHandle.tsx Ver fichero

@@ -10,7 +10,7 @@ export default function RoutePrefixHandle() {
const addPrefixToImg = (e: HTMLImageElement) => {
const url = new URL(e.src)
const prefix = url.pathname.slice(0, basePath.length)
if (prefix !== basePath && !url.href.startsWith('blob:') && !url.href.startsWith('data:')) {
if (prefix !== basePath && !url.href.startsWith('blob:') && !url.href.startsWith('data:') && !url.href.startsWith('http')) {
url.pathname = basePath + url.pathname
e.src = url.toString()
}

Cargando…
Cancelar
Guardar