@tanstack/router-core 1.171.14 → 1.171.15
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 +1 -4
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +1 -1
- package/dist/cjs/scroll-restoration.cjs +27 -34
- package/dist/cjs/scroll-restoration.cjs.map +1 -1
- package/dist/esm/router.d.ts +1 -1
- package/dist/esm/router.js +2 -4
- package/dist/esm/router.js.map +1 -1
- package/dist/esm/scroll-restoration.js +27 -34
- package/dist/esm/scroll-restoration.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +4 -8
- package/src/scroll-restoration.ts +40 -56
package/dist/cjs/router.cjs
CHANGED
|
@@ -49,7 +49,6 @@ function getLocationChangeInfo(location, resolvedLocation) {
|
|
|
49
49
|
hashChanged: fromLocation?.hash !== toLocation.hash
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
const locationHistoryActions = /* @__PURE__ */ new WeakMap();
|
|
53
52
|
/**
|
|
54
53
|
* Core, framework-agnostic router engine that powers TanStack Router.
|
|
55
54
|
*
|
|
@@ -541,8 +540,7 @@ var RouterCore = class {
|
|
|
541
540
|
this.startTransition(async () => {
|
|
542
541
|
try {
|
|
543
542
|
this.beforeLoad();
|
|
544
|
-
if (historyAction)
|
|
545
|
-
else locationHistoryActions.delete(this.latestLocation);
|
|
543
|
+
if (historyAction) this._scroll.hash = historyAction === "PUSH" || historyAction === "REPLACE";
|
|
546
544
|
const next = this.latestLocation;
|
|
547
545
|
const locationChangeInfo = getLocationChangeInfo(next, this.stores.resolvedLocation.get());
|
|
548
546
|
if (!this.stores.redirect.get()) this.emit({
|
|
@@ -1194,7 +1192,6 @@ exports.getInitialRouterState = getInitialRouterState;
|
|
|
1194
1192
|
exports.getLocationChangeInfo = getLocationChangeInfo;
|
|
1195
1193
|
exports.getMatchedRoutes = getMatchedRoutes;
|
|
1196
1194
|
exports.lazyFn = lazyFn;
|
|
1197
|
-
exports.locationHistoryActions = locationHistoryActions;
|
|
1198
1195
|
exports.trailingSlashOptions = trailingSlashOptions;
|
|
1199
1196
|
|
|
1200
1197
|
//# sourceMappingURL=router.cjs.map
|