File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -189,8 +189,7 @@ export const MatchInner = React.memo(function MatchInnerImpl({
189
189
190
190
const { match, key, routeId } = useRouterState ( {
191
191
select : ( s ) => {
192
- const matchIndex = s . matches . findIndex ( ( d ) => d . id === matchId )
193
- const match = s . matches [ matchIndex ] !
192
+ const match = s . matches . find ( ( d ) => d . id === matchId ) !
194
193
const routeId = match . routeId as string
195
194
196
195
const remountFn =
Original file line number Diff line number Diff line change @@ -185,8 +185,7 @@ export const MatchInner = (props: { matchId: string }): any => {
185
185
186
186
const matchState = useRouterState ( {
187
187
select : ( s ) => {
188
- const matchIndex = s . matches . findIndex ( ( d ) => d . id === props . matchId )
189
- const match = s . matches [ matchIndex ] !
188
+ const match = s . matches . find ( ( d ) => d . id === props . matchId ) !
190
189
const routeId = match . routeId as string
191
190
192
191
const remountFn =
You can’t perform that action at this time.
0 commit comments