@koordinates/xstate-tree 4.3.0-beta.4 → 4.3.0-beta.5
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 +3 -2
- package/package.json +1 -1
package/lib/xstateTree.js
CHANGED
|
@@ -152,7 +152,7 @@ function XstateTreeView({ interpreter }) {
|
|
|
152
152
|
// This is needed because the inState function needs to be recreated if the
|
|
153
153
|
// current state the machine is in changes. But _only_ then
|
|
154
154
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
155
|
-
[current.value]);
|
|
155
|
+
[current === null || current === void 0 ? void 0 : current.value]);
|
|
156
156
|
const selectorsProxy = (0, useConstant_1.useConstant)(() => {
|
|
157
157
|
return new Proxy({}, {
|
|
158
158
|
get: (_target, prop) => {
|
|
@@ -206,9 +206,10 @@ exports.XstateTreeView = XstateTreeView;
|
|
|
206
206
|
* @internal
|
|
207
207
|
*/
|
|
208
208
|
function recursivelySend(service, event) {
|
|
209
|
+
var _a;
|
|
209
210
|
const children = ([...service.children.values()] || []).filter((s) => s.id.includes("-slot"));
|
|
210
211
|
// If the service can't handle the event, don't send it
|
|
211
|
-
if (service.
|
|
212
|
+
if ((_a = service.getSnapshot()) === null || _a === void 0 ? void 0 : _a.nextEvents.includes(event.type)) {
|
|
212
213
|
try {
|
|
213
214
|
service.send(event);
|
|
214
215
|
}
|
package/package.json
CHANGED