@koordinates/xstate-tree 4.11.0 → 4.11.1

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
@@ -113,7 +113,13 @@ function useSlots(interpreter, slots) {
113
113
  return react_2.default.createElement(MultiView, null);
114
114
  }
115
115
  else {
116
- const interpreterForSlot = children.get(`${slot.toLowerCase()}-slot`);
116
+ const slotPrefix = `${slot.toLowerCase()}-`;
117
+ const childKey = [...children.keys()].find((key) => typeof key === "string" &&
118
+ key.startsWith(slotPrefix) &&
119
+ key.endsWith("-slot"));
120
+ const interpreterForSlot = childKey
121
+ ? children.get(childKey)
122
+ : undefined;
117
123
  if (interpreterForSlot) {
118
124
  const View = getViewForInterpreter(interpreterForSlot);
119
125
  return react_2.default.createElement(View, null);
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.11.0",
5
+ "version": "4.11.1",
6
6
  "license": "MIT",
7
7
  "description": "Build UIs with Actors using xstate and React",
8
8
  "keywords": [