@@ -40,8 +40,10 @@ export function tanstackRouterBrowserTracingIntegration(
40
40
const initialWindowLocation = WINDOW . location ;
41
41
if ( instrumentPageLoad && initialWindowLocation ) {
42
42
const matchedRoutes = castRouterInstance . matchRoutes (
43
- initialWindowLocation . pathname ,
44
- initialWindowLocation . search ,
43
+ {
44
+ pathname : initialWindowLocation . pathname ,
45
+ search : castRouterInstance . options . parseSearch ( initialWindowLocation . search ) ,
46
+ } ,
45
47
{ preload : false , throwOnError : false } ,
46
48
) ;
47
49
@@ -66,11 +68,10 @@ export function tanstackRouterBrowserTracingIntegration(
66
68
return ;
67
69
}
68
70
69
- const onResolvedMatchedRoutes = castRouterInstance . matchRoutes (
70
- onBeforeNavigateArgs . toLocation . pathname ,
71
- onBeforeNavigateArgs . toLocation . search ,
72
- { preload : false , throwOnError : false } ,
73
- ) ;
71
+ const onResolvedMatchedRoutes = castRouterInstance . matchRoutes ( onBeforeNavigateArgs . toLocation , {
72
+ preload : false ,
73
+ throwOnError : false ,
74
+ } ) ;
74
75
75
76
const onBeforeNavigateLastMatch = onResolvedMatchedRoutes [ onResolvedMatchedRoutes . length - 1 ] ;
76
77
@@ -88,11 +89,10 @@ export function tanstackRouterBrowserTracingIntegration(
88
89
const unsubscribeOnResolved = castRouterInstance . subscribe ( 'onResolved' , onResolvedArgs => {
89
90
unsubscribeOnResolved ( ) ;
90
91
if ( navigationSpan ) {
91
- const onResolvedMatchedRoutes = castRouterInstance . matchRoutes (
92
- onResolvedArgs . toLocation . pathname ,
93
- onResolvedArgs . toLocation . search ,
94
- { preload : false , throwOnError : false } ,
95
- ) ;
92
+ const onResolvedMatchedRoutes = castRouterInstance . matchRoutes ( onResolvedArgs . toLocation , {
93
+ preload : false ,
94
+ throwOnError : false ,
95
+ } ) ;
96
96
97
97
const onResolvedLastMatch = onResolvedMatchedRoutes [ onResolvedMatchedRoutes . length - 1 ] ;
98
98
0 commit comments