fix: infinite reload (#27150)

This commit is contained in:
Joel 2025-10-20 20:18:26 +08:00 committed by GitHub
parent 6217c96576
commit c11cdf7468
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -596,7 +596,8 @@ export const request = async<T>(url: string, options = {}, otherOptions?: IOther
Toast.notify({ type: 'error', message }) Toast.notify({ type: 'error', message })
return Promise.reject(err) return Promise.reject(err)
} }
globalThis.location.href = loginUrl if (globalThis.location.href !== loginUrl)
globalThis.location.href = loginUrl
return Promise.reject(err) return Promise.reject(err)
} }
else { else {