File tree 1 file changed +3
-11
lines changed
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -72,16 +72,8 @@ const Link = forwardRef<HTMLButtonElement | HTMLAnchorElement, LinkProps>(
72
72
) ) ||
73
73
''
74
74
: to ;
75
- const hrefDestination =
76
- href != null
77
- ? href
78
- : typeof to !== 'string'
79
- ? ( route &&
80
- createPath (
81
- generateLocationFromPath ( route . path , routeAttributes )
82
- ) ) ||
83
- ''
84
- : `${ routeAttributes . basePath } ${ to } ` ;
75
+ const staticBasePath =
76
+ href == null && typeof to === 'string' ? routeAttributes . basePath : '' ;
85
77
86
78
const triggerPrefetch = useCallback ( ( ) => {
87
79
// ignore if async route not ready yet
@@ -155,7 +147,7 @@ const Link = forwardRef<HTMLButtonElement | HTMLAnchorElement, LinkProps>(
155
147
validLinkType ,
156
148
{
157
149
...rest ,
158
- href : hrefDestination ,
150
+ href : ` ${ staticBasePath } ${ linkDestination } ` ,
159
151
target,
160
152
onClick : handleLinkPress ,
161
153
onKeyDown : handleLinkPress ,
You can’t perform that action at this time.
0 commit comments