diff --git a/src/ValidationError.js b/src/ValidationError.js index 4c94201..d635b57 100644 --- a/src/ValidationError.js +++ b/src/ValidationError.js @@ -69,7 +69,9 @@ function createPropertyFormatter(schema) { const subSchema = schema.properties[property]; if (hasType(subSchema)) { - type = subSchema.type; + const { type: subSchemaType } = subSchema; + + type = subSchemaType; } }