@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.
- package/dist/cjs/router.cjs +7 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +7 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +3 -3
- package/src/router.ts +8 -1
package/dist/esm/router.js
CHANGED
|
@@ -607,7 +607,7 @@ class Router {
|
|
|
607
607
|
if (reloadDocument) {
|
|
608
608
|
if (!href) {
|
|
609
609
|
const location = this.buildLocation({ to, ...rest });
|
|
610
|
-
href = location.href;
|
|
610
|
+
href = this.history.createHref(location.href);
|
|
611
611
|
}
|
|
612
612
|
if (rest.replace) {
|
|
613
613
|
window.location.replace(href);
|
|
@@ -747,6 +747,12 @@ class Router {
|
|
|
747
747
|
while (this.latestLoadPromise && loadPromise !== this.latestLoadPromise) {
|
|
748
748
|
await this.latestLoadPromise;
|
|
749
749
|
}
|
|
750
|
+
if (this.hasNotFoundMatch()) {
|
|
751
|
+
this.__store.setState((s) => ({
|
|
752
|
+
...s,
|
|
753
|
+
statusCode: 404
|
|
754
|
+
}));
|
|
755
|
+
}
|
|
750
756
|
};
|
|
751
757
|
this.startViewTransition = (fn) => {
|
|
752
758
|
const shouldViewTransition = this.shouldViewTransition ?? this.options.defaultViewTransition;
|