@kubb/ast 5.3.5 → 5.3.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/dist/index.js CHANGED
@@ -1042,7 +1042,9 @@ function* getChildren(node, recurse) {
1042
1042
  const value = record[key];
1043
1043
  if (Array.isArray(value)) {
1044
1044
  for (const item of value) if (isNode(item)) yield item;
1045
- } else if (isNode(value)) yield value;
1045
+ continue;
1046
+ }
1047
+ if (isNode(value)) yield value;
1046
1048
  }
1047
1049
  }
1048
1050
  /**
@@ -1097,7 +1099,9 @@ function transformChildren(node, visitor, recurse) {
1097
1099
  if (next !== item) mapped = [...value.slice(0, i), next];
1098
1100
  }
1099
1101
  if (mapped) (updates ??= {})[key] = mapped;
1100
- } else if (isNode(value)) {
1102
+ continue;
1103
+ }
1104
+ if (isNode(value)) {
1101
1105
  const next = transformNode(value, visitor, recurse, node);
1102
1106
  if (next !== value) (updates ??= {})[key] = next;
1103
1107
  }