fix: repair task 6 composite expression projection

This commit is contained in:
lda
2026-08-14 00:16:32 +07:00 Verified
parent b8a16a0fe7
commit 29d7a11da9
10 changed files with 278 additions and 54 deletions
@@ -285,19 +285,18 @@ const normalizeField = (
if (type === "array") {
const itemSchema = resolvedSchema.items;
if (itemSchema === undefined) {
return fallback(resolvedSchema, path, key, required, title, "The array has no item schema; edit JSON directly.");
}
const item = normalizeField(
rootSchema,
itemSchema,
[...path, 0],
"item",
true,
`${title} item`,
resolvedReferenceAncestry,
depth + 1,
);
const item = itemSchema === undefined
? null
: normalizeField(
rootSchema,
itemSchema,
[...path, 0],
"item",
true,
`${title} item`,
resolvedReferenceAncestry,
depth + 1,
);
return {
path,
key,