Update how property schemas are returned
This commit is contained in:
parent
ea808024d7
commit
b1fc9c024a
@ -126,8 +126,9 @@ class JsonSchemaProxyHandler {
|
|||||||
{
|
{
|
||||||
const properties = schema.properties;
|
const properties = schema.properties;
|
||||||
if (JsonSchemaProxyHandler.isObject(properties)) {
|
if (JsonSchemaProxyHandler.isObject(properties)) {
|
||||||
if (Object.prototype.hasOwnProperty.call(properties, property)) {
|
const propertySchema = properties[property];
|
||||||
return properties[property];
|
if (JsonSchemaProxyHandler.isObject(propertySchema)) {
|
||||||
|
return propertySchema;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +149,10 @@ class JsonSchemaProxyHandler {
|
|||||||
}
|
}
|
||||||
if (Array.isArray(items)) {
|
if (Array.isArray(items)) {
|
||||||
if (property >= 0 && property < items.length) {
|
if (property >= 0 && property < items.length) {
|
||||||
return items[property];
|
const propertySchema = items[property];
|
||||||
|
if (JsonSchemaProxyHandler.isObject(propertySchema)) {
|
||||||
|
return propertySchema;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user