@womp/kakapo-sdk 0.2.1 → 0.2.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.
@@ -143,7 +143,7 @@ export function assertScene(scene, operation) {
143
143
  if (!parentRaw)
144
144
  fail(`Tree parent ${parentId} does not exist.`, operation, `tree.${parentId}`, parentId, "existing parent node", undefined, "MISSING_TREE_NODE");
145
145
  const parentKind = kindFromWire(parentRaw.type);
146
- if (!CONTAINERS.has(parentKind))
146
+ if (Object.keys(children).length > 0 && !CONTAINERS.has(parentKind))
147
147
  fail(`Node ${parentId} (${parentKind}) cannot contain children.`, operation, `tree.${parentId}`, parentKind, "Union or Group parent", "Reparent the children under a Union or Group.", "LEAF_NODE_HAS_CHILDREN");
148
148
  for (const childId of Object.values(children)) {
149
149
  if (!scene.nodes[String(childId)])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@womp/kakapo-sdk",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Typed Node.js and browser SDK for controlling Kakapo over WebSocket",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",