@koordinates/xstate-tree 4.1.1 → 4.1.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/lib/xstateTree.js CHANGED
@@ -112,8 +112,7 @@ export function XstateTreeView({ interpreter }) {
112
112
  const { slots: interpreterSlots } = interpreter.machine.meta;
113
113
  const slots = useSlots(interpreter, interpreterSlots.map((x) => x.name));
114
114
  const canHandleEvent = useCallback((e) => {
115
- var _a;
116
- return (_a = interpreter.nextState(e).changed) !== null && _a !== void 0 ? _a : false;
115
+ return interpreter.getSnapshot().can(e);
117
116
  }, [interpreter]);
118
117
  const inState = useCallback((state) => {
119
118
  var _a, _b;
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.1",
5
+ "version": "4.1.2",
6
6
  "license": "MIT",
7
7
  "description": "Build UIs with Actors using xstate and React",
8
8
  "keywords": [