@tanstack/router-core 1.154.12 → 1.154.14
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/index.d.cts +1 -1
- package/dist/cjs/location.d.cts +0 -27
- package/dist/cjs/router.cjs +132 -261
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +5 -37
- package/dist/cjs/scroll-restoration.cjs +2 -2
- package/dist/cjs/scroll-restoration.cjs.map +1 -1
- package/dist/cjs/utils.cjs.map +1 -1
- package/dist/cjs/utils.d.cts +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/location.d.ts +0 -27
- package/dist/esm/router.d.ts +5 -37
- package/dist/esm/router.js +132 -261
- package/dist/esm/router.js.map +1 -1
- package/dist/esm/scroll-restoration.js +2 -2
- package/dist/esm/scroll-restoration.js.map +1 -1
- package/dist/esm/utils.d.ts +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -5
- package/src/location.ts +0 -35
- package/src/router.ts +167 -397
- package/src/scroll-restoration.ts +2 -2
- package/src/utils.ts +1 -1
|
@@ -340,8 +340,8 @@ export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
|
|
|
340
340
|
|
|
341
341
|
// If the user doesn't want to restore the scroll position,
|
|
342
342
|
// we don't need to do anything.
|
|
343
|
-
|
|
344
|
-
|
|
343
|
+
if (!router.resetNextScroll) {
|
|
344
|
+
router.resetNextScroll = true
|
|
345
345
|
return
|
|
346
346
|
}
|
|
347
347
|
if (typeof router.options.scrollRestoration === 'function') {
|
package/src/utils.ts
CHANGED
|
@@ -188,7 +188,7 @@ export type LooseAsyncReturnType<T> = T extends (
|
|
|
188
188
|
* Return the last element of an array.
|
|
189
189
|
* Intended for non-empty arrays used within router internals.
|
|
190
190
|
*/
|
|
191
|
-
export function last<T>(arr:
|
|
191
|
+
export function last<T>(arr: ReadonlyArray<T>) {
|
|
192
192
|
return arr[arr.length - 1]
|
|
193
193
|
}
|
|
194
194
|
|