File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717export function resolveHref ( href : string ) : string {
1818 const mainSiteUrl = process . env . NEXT_PUBLIC_MAIN_SITE_URL ;
1919
20- // If no main site URL configured, return original href
21- if ( ! mainSiteUrl ) {
20+ // If no main site URL configured or it's an empty string , return original href
21+ if ( ! mainSiteUrl || mainSiteUrl . trim ( ) === "" ) {
2222 return href ;
2323 }
2424
@@ -38,8 +38,8 @@ export function resolveHref(href: string): string {
3838export function shouldUseNextLink ( href : string ) : boolean {
3939 const mainSiteUrl = process . env . NEXT_PUBLIC_MAIN_SITE_URL ;
4040
41- // If main site URL is set, always use <a> tag
42- if ( mainSiteUrl ) {
41+ // If main site URL is set and not empty , always use <a> tag
42+ if ( mainSiteUrl && mainSiteUrl . trim ( ) !== "" ) {
4343 return false ;
4444 }
4545
You can’t perform that action at this time.
0 commit comments