@koordinates/xstate-tree 4.1.4 → 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
@@ -35,7 +35,6 @@ export function onBroadcast(handler) {
35
35
  function cacheKeyForInterpreter(
36
36
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
37
  interpreter) {
38
- console.log("cacheKeyForInterpreter", interpreter);
39
38
  return interpreter.sessionId;
40
39
  }
41
40
  const getViewForInterpreter = memoize((interpreter) => {
@@ -287,7 +286,7 @@ export function buildRootComponent(machine, routing) {
287
286
  }, [activeRoute]);
288
287
  useEffect(() => {
289
288
  if (routing) {
290
- const { getPathName = () => window.location.pathname, getQueryString = () => window.location.search, } = routing;
289
+ const { getPathName = () => routing.history.location.pathname, getQueryString = () => routing.history.location.search, } = routing;
291
290
  const queryString = getQueryString();
292
291
  const result = handleLocationChange(routing.routes, routing.basePath, getPathName(), getQueryString(), { onloadEvent: isLikelyPageLoad() });
293
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.4",
5
+ "version": "4.1.6",
6
6
  "license": "MIT",
7
7
  "description": "Build UIs with Actors using xstate and React",
8
8
  "keywords": [