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(/\/$/, ''); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// Mirror url must have `/`, we add this for compatible
|
|
|
|
const urlObj = new URL(currentUrl.replace(window.location.origin, url)); |
|
|
|
urlObj.pathname = `${urlObj.pathname.replace(/\/$/, '')}/`; |
|
|
|
window.location.href = urlObj.href; |
|
|
|
if (urlObj.host === '3x.ant.design' || urlObj.host === '4x.ant.design') { |
|
|
|
window.location.href = urlObj.href.replace(/\/$/, ''); |
|
|
|
return; |
|
|
|
} |
|
|
|
window.location.href = `${urlObj.href.replace(/\/$/, '')}/`; |
|
|
|
}, []); |
|
|
|
|
|
|
|
const onLangChange = useCallback(() => { |
|
|
|