@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.cjs CHANGED
@@ -1074,7 +1074,9 @@ function* getChildren(node, recurse) {
1074
1074
  const value = record[key];
1075
1075
  if (Array.isArray(value)) {
1076
1076
  for (const item of value) if (isNode(item)) yield item;
1077
- } else if (isNode(value)) yield value;
1077
+ continue;
1078
+ }
1079
+ if (isNode(value)) yield value;
1078
1080
  }
1079
1081
  }
1080
1082
  /**
@@ -1129,7 +1131,9 @@ function transformChildren(node, visitor, recurse) {
1129
1131
  if (next !== item) mapped = [...value.slice(0, i), next];
1130
1132
  }
1131
1133
  if (mapped) (updates ??= {})[key] = mapped;
1132
- } else if (isNode(value)) {
1134
+ continue;
1135
+ }
1136
+ if (isNode(value)) {
1133
1137
  const next = transformNode(value, visitor, recurse, node);
1134
1138
  if (next !== value) (updates ??= {})[key] = next;
1135
1139
  }