File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ let _createRoutesFromChildren: CreateRoutesFromChildren;
4747let _matchRoutes : MatchRoutes ;
4848let _stripBasename : boolean = false ;
4949
50- const CLIENTS_WITH_INSTRUMENT_NAVIGATION : Client [ ] = [ ] ;
50+ const CLIENTS_WITH_INSTRUMENT_NAVIGATION = new WeakSet < Client > ( ) ;
5151
5252interface ReactRouterOptions {
5353 useEffect : UseEffect ;
@@ -108,7 +108,7 @@ export function reactRouterV6BrowserTracingIntegration(
108108 }
109109
110110 if ( instrumentNavigation ) {
111- CLIENTS_WITH_INSTRUMENT_NAVIGATION . push ( client ) ;
111+ CLIENTS_WITH_INSTRUMENT_NAVIGATION . add ( client ) ;
112112 }
113113 } ,
114114 } ;
@@ -222,7 +222,7 @@ function handleNavigation(
222222 const branches = Array . isArray ( matches ) ? matches : _matchRoutes ( routes , location , basename ) ;
223223
224224 const client = getClient ( ) ;
225- if ( ! client || ! CLIENTS_WITH_INSTRUMENT_NAVIGATION . includes ( client ) ) {
225+ if ( ! client || ! CLIENTS_WITH_INSTRUMENT_NAVIGATION . has ( client ) ) {
226226 return ;
227227 }
228228
You can’t perform that action at this time.
0 commit comments