@uniweb/runtime 0.8.19 → 0.8.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/runtime",
3
- "version": "0.8.19",
3
+ "version": "0.8.20",
4
4
  "description": "Minimal runtime for loading Uniweb foundations",
5
5
  "type": "module",
6
6
  "exports": {
@@ -43,7 +43,7 @@
43
43
  "esbuild": "^0.21.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.27.0",
44
44
  "vite": "^7.3.1",
45
45
  "vitest": "^4.1.7",
46
- "@uniweb/build": "0.14.14"
46
+ "@uniweb/build": "0.14.15"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": "^19.0.0",
@@ -114,8 +114,11 @@ export function useRememberScroll(options = {}) {
114
114
 
115
115
  // Reset block states if requested (for animations, etc.)
116
116
  if (resetBlockStates) {
117
+ // activePage is null on a page-less site — guard before
118
+ // reaching for resetBlockStates, else `null.resetBlockStates` throws on
119
+ // navigation ("Cannot read properties of null").
117
120
  const page = globalThis.uniweb.activeWebsite.activePage
118
- if (typeof page.resetBlockStates === 'function') {
121
+ if (page && typeof page.resetBlockStates === 'function') {
119
122
  page.resetBlockStates()
120
123
  }
121
124
  }