@tanstack/react-router 0.0.1-beta.242 → 0.0.1-beta.244

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1610,8 +1610,9 @@
1610
1610
  const {
1611
1611
  buildLink
1612
1612
  } = useRouter();
1613
- const match = useMatch({
1614
- strict: false
1613
+ const matchPathname = useMatch({
1614
+ strict: false,
1615
+ select: s => s.pathname
1615
1616
  });
1616
1617
  const {
1617
1618
  // custom props
@@ -1646,7 +1647,7 @@
1646
1647
  ...rest
1647
1648
  } = options;
1648
1649
  const linkInfo = buildLink({
1649
- from: options.to ? match.pathname : undefined,
1650
+ from: options.to ? matchPathname : undefined,
1650
1651
  ...options
1651
1652
  });
1652
1653
  if (linkInfo.type === 'external') {
@@ -3110,12 +3111,13 @@
3110
3111
  const {
3111
3112
  navigate
3112
3113
  } = useRouter();
3113
- const match = useMatch({
3114
- strict: false
3114
+ const matchPathname = useMatch({
3115
+ strict: false,
3116
+ select: s => s.pathname
3115
3117
  });
3116
3118
  return React__namespace.useCallback(opts => {
3117
3119
  return navigate({
3118
- from: opts?.to ? match.pathname : undefined,
3120
+ from: opts?.to ? matchPathname : undefined,
3119
3121
  ...defaultOpts,
3120
3122
  ...opts
3121
3123
  });