Przeglądaj źródła

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

tags/1.8.0
17hz 2 miesięcy temu
rodzic
commit
f0684c1957
No account linked to committer's email address
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1
    1
      web/app/routePrefixHandle.tsx

+ 1
- 1
web/app/routePrefixHandle.tsx Wyświetl plik

@@ -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()
}

Ładowanie…
Anuluj
Zapisz