Skip to content

Commit

Permalink
fix: c6e7797 should account for evaluation in 2020+
Browse files Browse the repository at this point in the history
  • Loading branch information
ChALkeR committed Sep 16, 2023
1 parent 8f67c45 commit 80d07b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -896,10 +896,11 @@ const compileSchema = (schema, root, opts, scope, basePathRoot = '') => {

const suberr = suberror()
iterate((prop, evaluate) => {
const sub = subruleSub(suberr, prop, node.contains, subPath('contains'))
const ev = getMeta().containsEvaluates
const { sub } = subruleImpl(!ev, suberr, prop, node.contains, subPath('contains'))
fun.if(sub, () => {
fun.write('%s++', passes)
if (getMeta().containsEvaluates) {
if (ev) {
enforce(!removeAdditional, 'Can\'t use removeAdditional with draft2020+ "contains"')
evaluate()
}
Expand Down

0 comments on commit 80d07b8

Please sign in to comment.