Skip to content

Commit

Permalink
Add missing to include.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 13, 2022
1 parent 3e01ec4 commit 14ec84c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/config/normalize/lib/wild_wild_path_utils/include.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,16 @@ const reduceParents = function (
const entries = list(target, query, {
childFirst: false,
sort,
missing: false,
classes,
inherited,
})
return entries
.filter((entry) => shouldUseEntry(entry, target, condition))
.filter((entry) => condition(entry, target))
.filter(hasNoParentSet)
.reduce((newTargetA, entry) => setFunc(newTargetA, entry, 0), newTarget)
}

const shouldUseEntry = function (entry, target, condition) {
return !entry.missing && condition(entry, target)
}

// If both a parent and a child property are set, the parent prevails
const hasNoParentSet = function ({ path: pathA }, indexA, entries) {
return entries.every(
Expand Down

0 comments on commit 14ec84c

Please sign in to comment.