getSchemaOrValueType return null

This commit is contained in:
toasted-nutbread 2020-02-01 22:57:27 -05:00
parent 0171d86b28
commit 36e641e001

View File

@ -179,14 +179,14 @@ class JsonSchemaProxyHandler {
return valueType; return valueType;
} }
} }
throw new Error(`Ambiguous property type for ${property}`); return null;
} }
if (typeof type === 'undefined') { if (typeof type === 'undefined') {
if (typeof value !== 'undefined') { if (typeof value !== 'undefined') {
return JsonSchemaProxyHandler.getValueType(value); return JsonSchemaProxyHandler.getValueType(value);
} }
throw new Error(`No property type for ${property}`); return null;
} }
return type; return type;