Modifying the preview of the uploaded avatar will freeze, fix the bug… (#20202)
Co-authored-by: qingguo <qingguo@lexin.com>
This commit is contained in:
parent
9c9d3d7bd0
commit
efad1e4790
2 changed files with 2 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ export default function RoutePrefixHandle() {
|
|||
const addPrefixToImg = (e: HTMLImageElement) => {
|
||||
const url = new URL(e.src)
|
||||
const prefix = url.pathname.substr(0, basePath.length)
|
||||
if (prefix !== basePath) {
|
||||
if (prefix !== basePath && !url.href.startsWith('blob:') && !url.href.startsWith('data:')) {
|
||||
url.pathname = basePath + url.pathname
|
||||
e.src = url.toString()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue