@esmx/router 3.0.0-rc.118 → 3.0.0-rc.119

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/scroll.mjs CHANGED
@@ -43,7 +43,8 @@ export function saveScrollPosition(key, scrollPosition = winScrollPos()) {
43
43
  }
44
44
  }
45
45
  export function getSavedScrollPosition(key, defaultValue = null) {
46
- const scroll = scrollPositions.get(key) || history.state[POSITION_KEY];
46
+ var _a;
47
+ const scroll = scrollPositions.get(key) || ((_a = history.state) == null ? void 0 : _a[POSITION_KEY]);
47
48
  scrollPositions.delete(key);
48
49
  return scroll || defaultValue;
49
50
  }
package/package.json CHANGED
@@ -64,7 +64,7 @@
64
64
  "unbuild": "3.6.1",
65
65
  "vitest": "3.2.6"
66
66
  },
67
- "version": "3.0.0-rc.118",
67
+ "version": "3.0.0-rc.119",
68
68
  "type": "module",
69
69
  "private": false,
70
70
  "exports": {
@@ -83,7 +83,7 @@
83
83
  "template",
84
84
  "public"
85
85
  ],
86
- "gitHead": "2fdbd62470f64e6e45568550941c78cb259e4917",
86
+ "gitHead": "81e07f64b3831143577f94c63ce0938977591a6d",
87
87
  "engines": {
88
88
  "node": ">=24"
89
89
  },
package/src/scroll.ts CHANGED
@@ -98,7 +98,7 @@ export function getSavedScrollPosition(
98
98
  key: string,
99
99
  defaultValue: _ScrollPosition | null = null
100
100
  ): _ScrollPosition | null {
101
- const scroll = scrollPositions.get(key) || history.state[POSITION_KEY];
101
+ const scroll = scrollPositions.get(key) || history.state?.[POSITION_KEY];
102
102
 
103
103
  // Saved scroll position should not be used multiple times, next time should use newly saved position
104
104
  scrollPositions.delete(key);