mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
🔨 fix site code lgtm problems (#21732)
This commit is contained in:
parent
f78332171e
commit
301529e0d4
@ -123,8 +123,7 @@ export function getLocalizedPathname(
|
||||
},
|
||||
) {
|
||||
const pathname = path.startsWith('/') ? path : `/${path}`;
|
||||
let fullPath = pathname;
|
||||
|
||||
let fullPath;
|
||||
if (!zhCN) {
|
||||
// to enUS
|
||||
fullPath = /\/?index-cn/.test(pathname) ? '/' : pathname.replace('-cn', '');
|
||||
@ -137,7 +136,7 @@ export function getLocalizedPathname(
|
||||
}
|
||||
|
||||
if (hash) {
|
||||
const localHash = hash[isZhCN ? 'zhCN' : 'enUS'];
|
||||
const localHash = hash[zhCN ? 'zhCN' : 'enUS'];
|
||||
fullPath += `#${localHash}`;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user