Skip to content

Commit

Permalink
reverting back to selectedLayoutSegments[selectedLayoutSegments.lengt…
Browse files Browse the repository at this point in the history
…h-1]
  • Loading branch information
williamli committed Jan 20, 2024
1 parent c986cae commit b59d6b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/client/components/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export function useSelectedLayoutSegment(

return parallelRouteKey === 'children'
? selectedLayoutSegments[0]
: selectedLayoutSegments.slice(-1) ?? null
: selectedLayoutSegments[selectedLayoutSegments.length-1] ?? null
}

export { redirect, permanentRedirect, RedirectType } from './redirect'
Expand Down

0 comments on commit b59d6b5

Please sign in to comment.