@tanstack/react-router 1.99.6 → 1.99.8

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.
@@ -609,7 +609,7 @@ class Router {
609
609
  if (reloadDocument) {
610
610
  if (!href) {
611
611
  const location = this.buildLocation({ to, ...rest });
612
- href = location.href;
612
+ href = this.history.createHref(location.href);
613
613
  }
614
614
  if (rest.replace) {
615
615
  window.location.replace(href);
@@ -749,6 +749,12 @@ class Router {
749
749
  while (this.latestLoadPromise && loadPromise !== this.latestLoadPromise) {
750
750
  await this.latestLoadPromise;
751
751
  }
752
+ if (this.hasNotFoundMatch()) {
753
+ this.__store.setState((s) => ({
754
+ ...s,
755
+ statusCode: 404
756
+ }));
757
+ }
752
758
  };
753
759
  this.startViewTransition = (fn) => {
754
760
  const shouldViewTransition = this.shouldViewTransition ?? this.options.defaultViewTransition;