afc163
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
3 deletions
-
.dumi/theme/slots/Header/index.tsx
|
@ -213,11 +213,13 @@ const Header: React.FC = () => { |
|
|
.replace(/\/$/, ''); |
|
|
.replace(/\/$/, ''); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Mirror url must have `/`, we add this for compatible
|
|
|
// Mirror url must have `/`, we add this for compatible
|
|
|
const urlObj = new URL(currentUrl.replace(window.location.origin, url)); |
|
|
const urlObj = new URL(currentUrl.replace(window.location.origin, url)); |
|
|
urlObj.pathname = `${urlObj.pathname.replace(/\/$/, '')}/`; |
|
|
if (urlObj.host === '3x.ant.design' || urlObj.host === '4x.ant.design') { |
|
|
window.location.href = urlObj.href; |
|
|
window.location.href = urlObj.href.replace(/\/$/, ''); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
window.location.href = `${urlObj.href.replace(/\/$/, '')}/`; |
|
|
}, []); |
|
|
}, []); |
|
|
|
|
|
|
|
|
const onLangChange = useCallback(() => { |
|
|
const onLangChange = useCallback(() => { |
|
|