Skip to content

Commit

Permalink
fix: supporting cases where navigating with router state and stickyPa…
Browse files Browse the repository at this point in the history
…rams
  • Loading branch information
jordanl17 committed Feb 17, 2025
1 parent 6cd59c1 commit bedeabd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sanity/src/router/RouteScope.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export const RouteScope = function RouteScope(props: RouteScopeProps): React.JSX
* But... not sure what
*/
parent_navigate(
options?.stickyParams ? nextState : resolveNextParentState(nextState),
// as in, if you are doing what navigateStickyParams does, then nextState is null
options?.stickyParams && nextState === null ? null : resolveNextParentState(nextState),
options,
),
[parent_navigate, resolveNextParentState],
Expand Down

0 comments on commit bedeabd

Please sign in to comment.