@sanity/schema 5.10.0-next.30 → 5.10.0-next.32
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/_internal.js +1 -1
- package/lib/_internal.js.map +1 -1
- package/package.json +5 -5
package/lib/_internal.js
CHANGED
|
@@ -2428,7 +2428,7 @@ function extractSchema(schemaDef, extractOptions = {}) {
|
|
|
2428
2428
|
function convertSchemaType(schemaType) {
|
|
2429
2429
|
if (inlineFields.has(schemaType.type))
|
|
2430
2430
|
return { type: "inline", name: schemaType.type.name };
|
|
2431
|
-
if (schemaType.type?.name && sortedSchemaTypeNames.indexOf(schemaType.type?.name) > -1)
|
|
2431
|
+
if (schemaType.type?.name && sortedSchemaTypeNames.indexOf(schemaType.type?.name) > -1 && lastType(schemaType.type)?.name !== "document")
|
|
2432
2432
|
return { type: "inline", name: schemaType.type?.name };
|
|
2433
2433
|
if (isStringType(schemaType))
|
|
2434
2434
|
return createStringTypeNodeDefintion(schemaType);
|