@typed/navigation 0.4.1 → 0.4.2

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": "@typed/navigation",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -22,9 +22,9 @@
22
22
  "@effect/data": "^0.17.1",
23
23
  "@effect/io": "^0.38.0",
24
24
  "@typed/context": "0.17.1",
25
- "@typed/dom": "8.17.1",
25
+ "@typed/dom": "8.17.2",
26
26
  "@typed/fx": "1.16.1",
27
- "@typed/path": "0.6.1",
27
+ "@typed/path": "0.6.2",
28
28
  "happy-dom": "^10.9.0"
29
29
  },
30
30
  "publishConfig": {
@@ -35,5 +35,5 @@
35
35
  "@types/node": "^20.4.10",
36
36
  "vitest": "0.34.1"
37
37
  },
38
- "gitHead": "e046a647cdccb4443f938c1ed7c36dbef9783004"
38
+ "gitHead": "9083c6af485d129f95e5f7b07d1bfb285668b7dd"
39
39
  }
package/src/history.ts CHANGED
@@ -57,7 +57,11 @@ export const patchHistory: Effect.Effect<
57
57
  history.scrollRestoration = value
58
58
  },
59
59
  get state() {
60
- return stateDescriptor?.get?.call(history)
60
+ const state = stateDescriptor?.get?.call(history)
61
+
62
+ if (state && state.key && state.state) return state.state
63
+
64
+ return state
61
65
  },
62
66
  back: history.back.bind(history),
63
67
  forward: history.forward.bind(history),