mirror of
https://github.com/nocobase/nocobase.git
synced 2026-11-03 13:02:17 +08:00
7 lines
174 B
TypeScript
7 lines
174 B
TypeScript
export function transformHref(href: string, lang: string) {
|
|
if (href.startsWith('/') && !href.startsWith(`/${lang}/`)) {
|
|
return `/${lang}${href}`;
|
|
}
|
|
return href;
|
|
}
|