@koordinates/xstate-tree 4.1.5 → 4.1.6

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/lib/xstateTree.js CHANGED
@@ -286,7 +286,7 @@ export function buildRootComponent(machine, routing) {
286
286
  }, [activeRoute]);
287
287
  useEffect(() => {
288
288
  if (routing) {
289
- const { getPathName = () => window.location.pathname, getQueryString = () => window.location.search, } = routing;
289
+ const { getPathName = () => routing.history.location.pathname, getQueryString = () => routing.history.location.search, } = routing;
290
290
  const queryString = getQueryString();
291
291
  const result = handleLocationChange(routing.routes, routing.basePath, getPathName(), getQueryString(), { onloadEvent: isLikelyPageLoad() });
292
292
  if (result) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@koordinates/xstate-tree",
3
3
  "main": "lib/index.js",
4
4
  "types": "lib/xstate-tree.d.ts",
5
- "version": "4.1.5",
5
+ "version": "4.1.6",
6
6
  "license": "MIT",
7
7
  "description": "Build UIs with Actors using xstate and React",
8
8
  "keywords": [