diff --git a/src/compile.js b/src/compile.js index 7a9f8ae..aa05996 100644 --- a/src/compile.js +++ b/src/compile.js @@ -1284,7 +1284,10 @@ const compileSchema = (schema, root, opts, scope, basePathRoot = '') => { evaluateDelta({ type: [current.type] }) return null } - if (parentCheckedType(...typearr)) return null + if (parentCheckedType(...typearr)) { + evaluateDelta({ type: typearr }) + return null + } const filteredTypes = typearr.filter((t) => typeApplicable(t)) if (filteredTypes.length === 0) fail('No valid types possible') evaluateDelta({ type: typearr }) // can be safely done here, filteredTypes already prepared